You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/data-table/README.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,30 @@ See https://aktos.io/st/#/showcase/data-table
4
4
5
5
# Properties
6
6
7
-
-Marks last clicked row
8
-
-Display a message while opening a row
7
+
-Provides `on-init = (cb) -> cb!` function for initialization.
8
+
-Executes a function while opening a row (`on-create-view = (row, cb) -> return cb(err, curr)` or `(row) ->> return curr`. `row` is the relevant element of `tableview` array.)
9
9
- Displays error or info messages
10
10
- Opens appropriate row if url matches with document id
11
11
- Scrolls to clicked row (or opening row by url)
12
+
- Memorizes last clicked row (`isLastClicked(.id)`)
12
13
- Disables other rows in order to prevent accidental openings while a row is opened
13
14
- Displays a warning if a filter is selected other than `all`
14
15
15
-
# Names
16
+
# Variables
16
17
17
-
tableview : whole array that has the minimum data to create table view
18
+
`tableview` : Whole array that has the minimum data to create table view
18
19
19
-
tableview_visible: only the items for the current (selected) page of `tableview`
20
+
`tableview_visible`: only the items for the current (selected) page of `tableview`
20
21
21
-
curr: current document that is selected or being created
22
+
`curr`: current document that is selected or being created
22
23
23
-
readonly: if data-table has no `editForm` partial or set `readonly` explicitly, then it is readonly
24
+
`readonly`: if data-table has no `editForm` partial or set `readonly` explicitly, then it is readonly
25
+
26
+
`print_mode`: (Bool) Indicates that current view form is in print mode.
27
+
28
+
`tmp`: (Object) A temporary variable that resets on every view-form creation.
29
+
30
+
`this.actor`: Data-table's actor.
24
31
25
32
# Partials (sections)
26
33
@@ -35,16 +42,24 @@ editForm: The section that appears when something "Edit" button is pressed
35
42
36
43
`data-table` won't display any new entries unless it's successfully written to the database.
37
44
38
-
`curr` document will be fetched from database everytime
45
+
`curr` document must be manually assigned within `on-create-view` handler.
46
+
47
+
if `auto-refresh` is not set to `yes`, a `Click to update` button will popup when table data is modified outside current window.
39
48
40
-
if `auto-refresh` is not set to `yes`, a `Click to update` button will popup when table data is
41
-
modified outside current window.
49
+
Fields declared in `search-field` must be maximum of 2 levels deep (`value.foo_bar` is okay but `value.foo.bar` is not okay).
0 commit comments