avo-hq/avo
View on GitHubAdd a `hidden_when`/`disabled_when` option to the index/show/edit controls
Open
#2,153 opened on Dec 18, 2023
Help wantedJavascriptTask
Repository metrics
- Stars
- (1,778 stars)
- PR merge metrics
- (Avg merge 1d 6h) (67 merged PRs in 30d)
Description
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.