avo-hq/avo

Add a `hidden_when`/`disabled_when` option to the index/show/edit controls

オープン

#2,153 opened on 2023/12/18

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Ruby (308 件のフォーク)user submission
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.

コントリビューターガイド