tunapanel
tunapanel copied to clipboard
Widgets for enums
Dropdowns? Radio buttons?
Can you do differ depending on enum given?
enum CoffeType {
HotChocolate,
Espresso,
Machiato,
}
Seems perfectly fit for radio group/dropdown, with simple annoation #[dropdown] enum CoffeType
/ #[radiogroup] enum CoffeType
enum DDForm3018 {
NaturalizedCitizen,
UnnaturalizedCitizen {
has_voted_yes_on_proposition_187: bool,
has_been_called_in_for_jury_dute: bool,
},
}
This wouldn't. It probably be some complex radio button that enables certain panels or something.
Would it be possible for other people to register/create their own implementations? But, what is the scope of this library? Allow complex behavior? I.e. when one radio group selected enable some set of controls?