Multiselect with search option

376
7
Jump to solution
04-29-2024 07:39 AM
WalaZargouni
New Contributor II

Hello, i need a multiselect with a search functionality just like the one used in the Filter widget in Experience builder, i cannot find what i'm looking for in jimu-ui.

Can someone help ?

0 Kudos
2 Solutions

Accepted Solutions
TonghuiMing
Esri Regular Contributor

@WalaZargouni The AdvancedSelect component is what you are looking for.

View solution in original post

0 Kudos
TonghuiMing
Esri Regular Contributor
7 Replies
JeffreyThompson2
MVP Regular Contributor

I think you are talking about FieldSelector. 

https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-advanced-d...

Take a look in the advanced folder of the Storybook to see if you find what you want. There are several similar options.

GIS Developer
City of Arlington, Texas
0 Kudos
WalaZargouni
New Contributor II

It looks like the FieldSelector component yes, but with the FieldSelector it works only with a datasource and its fields. i need to load the items of the select with an api call

0 Kudos
TonghuiMing
Esri Regular Contributor

@WalaZargouni The AdvancedSelect component is what you are looking for.

0 Kudos
JanSarata
Esri Contributor

Hi @TonghuiMing, as far as I know, The AdvancedSelect is still missing the method onSearchInputChanged which is really important while using with API calls as @WalaZargouni mentioned. Are there any plans to implement this method? https://developers.arcgis.com/experience-builder/storybook/?path=/story/components-jimu-ui-index-ad...

TonghuiMing
Esri Regular Contributor

@JanSarata You are referring to https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-advanced-select..., right? We will note that and see if we can implement it.

WalaZargouni
New Contributor II

Yes apparently the AdvancedSelect is what i need, the dynamic data example code is not available in the storybook, i tried implementing it as the following 

<AdvancedSelect
                  onChange={function noRefCheck(){}}
                  staticValues={[
                    {
                      label: 'Label-1',
                      value: 1
                    },
                    {
                      label: 'Label-2',
                      value: 2
                    },
                    {
                      label: 'Label-3',
                      value: 3
                    }
                  ]}
                  isEmptyOptionHidden
                  isMultiple
                  hideBottomTools
                />
but the problem is that when i select a value nothing happens, you can see it in the attached GIF, is it a bug or am i missing something ? 
0 Kudos
JeffreyThompson2
MVP Regular Contributor

The onChange={function noRefCheck(){}} function does not do anything. You will need to write your own onChange function to handle the click event as needed.

GIS Developer
City of Arlington, Texas
0 Kudos