[PUI] Select component with async support #5495
Replies: 3 comments 3 replies
-
An alternative option (if this is even possible) might be to integrate something like react-window-infinite-loader instead of the native mantine select dropdown? |
Beta Was this translation helpful? Give feedback.
-
With that information and support from mantine, I would suggest using the react select library with the |
Beta Was this translation helpful? Give feedback.
-
@SchrodingersGat this looks like a good solution that could probably be used generically. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently implementing modal forms / API forms in #5355. This is a major refactor of the existing forms interface, rewritten for react / mantine.
However, I am running into a blocking issue - async data fetching support using the Select component provided by mantine.
By default, the select component does not support async data fetching. However, it can be implemented using various hooks. Some information is available here:
I have made some progress here, but the implementation is not anywhere near as good as the existing javascript implementation which uses select2
In particular, it appears quite difficult to support "infinite pagination" - that is, fetching new results as the user scrolls down through the available options. In fact in this comment the developer states it is not supported at all.
Good async support for these dropdown is critical for our API / modal form architecture.
@matmair @wolflu05 any thoughts on this one?
Perhaps we should integrate react select? How would this "theme" in with mantine? Can we mix and match components like this?
Beta Was this translation helpful? Give feedback.
All reactions