calciteLookupChange event when combobox selectionMode is single

987
2
Jump to solution
07-08-2021 03:32 PM
RobStauder
Occasional Contributor

What am I missing here -

  1. I add a calcite-combobox to a calcite-modal
  2. I addEventListener('calciteLookupChange', function(evt)....

If the combobox selectionMode === single, the event doesn't fire

If the combobox selectionMode === multi or ancestors, the event does fire and I can get the selected item from evt.detail[0].

How do I get the selected item from the combobox when using single selection mode?

Referencing https://github.com/Esri/calcite-components/tree/v1.0.0-beta.52/src/components/calcite-combobox

 

Thanks!

 

Rob

0 Kudos
1 Solution

Accepted Solutions
JohnGrayson
Esri Regular Contributor

Hey Rob!  I've used the 'calciteComboboxItemChange' event in a recent app and it seems to do what I needed.  Here's a codepen showing how I use it: https://codepen.io/john-grayson/pen/zYwBVBZ

 

View solution in original post

2 Replies
JohnGrayson
Esri Regular Contributor

Hey Rob!  I've used the 'calciteComboboxItemChange' event in a recent app and it seems to do what I needed.  Here's a codepen showing how I use it: https://codepen.io/john-grayson/pen/zYwBVBZ

 

RobStauder
Occasional Contributor

Thanks John. I appreciate the assist.

To sum - using the calciteComboboxItemChange event (instead of calciteLookupChange) and the newer version of calcite (beta 5.9 instead of 5.2) did it.

Best regards!

Rob

0 Kudos