avo-hq/avo
Auf GitHub ansehenAdd a `hidden_when`/`disabled_when` option to the index/show/edit controls
Open
#2.153 geöffnet am 18. Dez. 2023
Help wantedJavascriptTask
Repository-Metriken
- Stars
- (1.778 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 1T 6h) (67 gemergte PRs in 30 T)
Beschreibung
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.