Commit 5793fdf 1 parent 4f19403 commit 5793fdf Copy full SHA for 5793fdf
File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,35 @@ Each filter is configured in a class with a few dedicated [methods and options](
13
13
<Option name =" `self.name` " >
14
14
15
15
` self.name ` is what is going to be displayed to the user in the filters panel.
16
+
17
+ ``` ruby
18
+ self .name = " User names filter"
19
+ ```
20
+
21
+ <VersionReq version =" 3.14.0 " />
22
+
23
+ ``` ruby
24
+ self .name = -> { I18n .t(" avo.filter.name" ) }
25
+ ```
26
+ Within this block, you gain access to all attributes of [ ` Avo::ExecutionContext ` ] ( execution-context ) along with the ` arguments ` .
27
+
28
+ </Option >
29
+
30
+ <Option name =" `self.button_label` " >
31
+
32
+ The value of ` self.button_label ` is the label displayed on the button that applies the filter.
33
+
34
+ ``` ruby
35
+ self .button_label = " Filter by user names"
36
+ ```
37
+
38
+ <VersionReq version =" 3.14.0 " />
39
+
40
+ ``` ruby
41
+ self .button_label = -> { I18n .t(" avo.filter.button_label" ) }
42
+ ```
43
+ Within this block, you gain access to all attributes of [ ` Avo::ExecutionContext ` ] ( execution-context ) along with the ` arguments ` .
44
+
16
45
</Option >
17
46
18
47
<Option name =" `self.visible` " >
You can’t perform that action at this time.
0 commit comments