avo-hq/avo
Add a `hidden_when`/`disabled_when` option to the index/show/edit controls
Aperta
#2153 aperta il 18 dic 2023
Help wantedJavascriptTask
Metriche repository
- Star
- (1778 stelle)
- Metriche merge PR
- (Merge medio 1g 6h) (67 PR mergiate in 30 g)
Descrizione
Example api
self.show_controls = -> {
action SomeAction, hidden_when: :any_record_selected
action SomeAction, hidden_when: :no_record_selected
action SomeAction, disabled_when: :any_record_selected
action SomeAction, disabled_when: :no_record_selected
}
This would act as a hidden/disabled state when a specific condition applies.