Reusing SearchSelect for string fields limited to specific values #76
Replies: 1 comment 3 replies
-
For LiveAdmin form components, the guiding philosophy has been that their behavior is 100% determined by field type in the Ecto schema. So if something has a set number of options the expectation is that in most cases this should be an Ecto.Enum field which is controlled by a non-search select. I'd like to continue that policy so as to keep things as simple as possible, with overrides for anything custom. That said I recognize that overriding the entire form component is a pretty heavy handed solution. For similar reasons we introduced the Can you explain a bit more about your use case, specifically why using an enum/select field isn't a good fit? |
Beta Was this translation helpful? Give feedback.
-
I'm going to be rolling something like this on my own by overriding the form component and either reusing or abstracting the SearchSelect component, but it might be nice to -- out of the box -- allow a definable
options
attribute for specific fields (or something similar), which, if used, leverages the SearchSelect functionality to act like a select box with autocomplete.Beta Was this translation helpful? Give feedback.
All reactions