Async Filtering for Combobox #32271
mathis-m
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use Async Combobox Filter
An example generic implementation for
Combobox
component to support filtering in the backend.The main motivation on this is that there is no OOTB implementation for an async search with result list component. I do not want to implement all magic again that is why I opted to use the
Combobox
component as base.While implementing this I found some weird behaviours of the
Combobox
component, e.g.// clear selection for single-select if the input value no longer matches the selection
Or resizing the combobox according to it's content (see example inline tags).
This is the initial implemation and may still miss some things.
Playground: https://stackblitz.com/edit/qxuhm6?file=src%2Fexample.tsx
![image](https://private-user-images.githubusercontent.com/11584315/356673560-41c7fe01-b794-483b-9e25-8d63c1d6f517.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjMxMDAsIm5iZiI6MTcyNjEyMjgwMCwicGF0aCI6Ii8xMTU4NDMxNS8zNTY2NzM1NjAtNDFjN2ZlMDEtYjc5NC00ODNiLTllMjUtOGQ2M2MxZDZmNTE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2MzMyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdjNjkxNzkzNjE5OGVmYTljZTBlNmQyYWUxZjc1NmY3YWJjZGNjMGIyMmFhNTNhNjU3MTdkY2QwMzgyNWRjMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8mMQcYW8A01Bw3ssnO_lBmcXVF318ToP7xbdnZ-aeyk)
Would be great if fluentui had OOTB support for async combobox.
Are there any plans to provide a component that works with asynchronous use cases of searching and making results selectable?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions