Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropdown list for Combobox doesnt appear when we dynamically fetch api and display results. #188

Open
2 tasks
chunteck opened this issue Oct 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@chunteck
Copy link

Prerequisites

Describe the issue

We use the Combobox this way

<Form.Group props...>
      <Combobox
         menuList={returnedItems}  //response from the api
         onChangeInput={(val, _e) => {
            if (val.length >= 3) {
               dispatch(searchUsers(val));  //send an api
            }
         props...
         }} />

What we do is type 3 characters into the dropdown. Once the characters are typed, we see the api being fired, and a response is returned. However, we notice that the dropdown doesnt appear after the response is returned and populated into the returnedItems array.

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

Describe your frontend stack. What version of React and @govtechsg/sgds-react are you using? CSR or SSR?

2.2.1

@chunteck chunteck added the bug Something isn't working label Oct 16, 2023
@clye-cog
Copy link

clye-cog commented Oct 4, 2024

Hi @clukhei , my team and I are experiencing this issue as well

@clukhei
Copy link
Collaborator

clukhei commented Oct 7, 2024

Hi @clye-cog , the combobox was built for users to quickly filter through a static menu list to find their input value. This case sounds like a dynamic menu list which changes as the user inputs a more specific value, like an autocomplete or search bar. I need to take back with my team to discuss if this is a proper use case of a combobox.

Also need to think about how this kind of filtering will work in a multiselect combobox case.

@clukhei clukhei added enhancement New feature or request and removed bug Something isn't working labels Oct 7, 2024
@clye-cog
Copy link

clye-cog commented Oct 7, 2024

Hi @clukhei , okay noted. I have logged a separate issue for my case as my team is using it as a static list but we have an api call that needs to be made to populate the list:

#271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants