Closed nathan-yuen closed 12 months ago
Hi @nathan-yuen and thanks!
What you're proposing is not a good idea in my opinion, because configuration is global and shared by all applications. The live_select options that you specify in your config will be used by other applications included in your project.
Let's imagine for example that Phoenix LiveDashboard started to use live_select internally. Then, if you include LiveDashboard in your project, it will immediately inherit your global configuration, which might lead to unexpected issues.
If you want to specify some application-wide defaults for live_select I suggest that you wrap it into a function component. For example you could add it to core_components.ex
as described here and specify the default options there.
Does this make sense?
Yea, it make sense. Wrapping live_select was definitely one of my option.
The idea mostly stemmed from using flop_phoenix 's config
Thank you for this awesome library Was wondering if there's chance to support setting all the default classes in
config.exs
?Something like this
Thanks!