Replies: 1 comment
-
I suppose #5928 is at least related to this. I added my request as a comment there and am closing this discussion. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to use searchable Async Selects for a number of inputs. In them, an empty search input, both when first opening the select and emptying a previous search, should result in a search with no filter.
I realise that I can set defaultOptions to get something like this, but it only makes an empty search on mount.
I want to
Especially the second part is very important in two cases:
I know that it is possible to re-trigger the defaultOptions search by changing the components key, but this feels like a very hacky way of handling it and still cannot reflect possible changes in the data source.
A property like
allowEmptySearch
could be used to avoid a breaking change from this, although I would argue that this behaviour (treating empty search fields the same as filled ones) is what people would actually expect. I certainly did, and my colleagues and I were quite surprised by the current behaviour.If a min length like #5832 proposes s introduced with a default of 1, it would also avoid the breaking change as setting it to 0 would already indicate that loads from searches are wanted.
If done without an extra property,
defaultOptions
should probably override this behaviour to avoid having the options list change shortly after opening and without user input.I took a brief look at the code and it looks simple enough to implement, so I'd happily contribute the changes myself.
Beta Was this translation helpful? Give feedback.
All reactions