avo-hq/avo
Add a `hidden_when`/`disabled_when` option to the index/show/edit controls
オープン
#2,153 opened on 2023/12/18
Help wantedJavascriptTask
Repository metrics
- Stars
- (1,778 個のスター)
- PR merge metrics
- (平均マージ 1d 6h) (30d で 67 merged PRs)
説明
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.