Skip to content

Commit 0871c6f

Browse files
committed
feat: add documentation of new methods
1 parent ce21453 commit 0871c6f

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

README.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ Vue.use(TreeGrid);
5757
:rows="rows"
5858
:columns="columns"
5959
:rowStyle="rowStyle"
60+
:formatNoMatches="formatNoMatches"
6061
@onPostBody="onPostBody"
6162
@onClickRow="onClickRow"
6263
@headerStyle="headerStyle"
63-
@formatNoMatches="formatNoMatches"
6464
>
6565
</treegrid>
6666
</div>
@@ -165,24 +165,29 @@ Below are some configurations supported by the component, if you need a new conf
165165
166166
## Props
167167
168-
| Name | Type | Default | Description |
169-
| ------------- | -------- | ------- | ------------------------------------------------------------------ |
170-
| Rows | Array | | All table body data |
171-
| Columns | Array | | All data on column headings |
172-
| idField | String | id | Overwrite the default idField to 'id' |
173-
| parentIdField | String | pid | Set the parent id field. |
174-
| treeShowField | String | | Set the treeShowField will auto enable the tree grid. |
175-
| rootParentId | String | null | Set the root parent id. |
176-
| treeEnable | Boolean | false | Set true to enable the tree grid. |
177-
| stickyHeader | Boolean | false | Set true to use sticky header. |
178-
| clickColor | String | | Color displayed in the background when clicking on a line |
179-
| rowStyle | Function | {} | The row style formatter function, takes two parameters: row, index |
168+
| Name | Type | Default | Description |
169+
| --------------- | -------- | ------- | ------------------------------------------------------------------ |
170+
| Rows | Array | | All table body data |
171+
| Columns | Array | | All data on column headings |
172+
| idField | String | id | Overwrite the default idField to 'id' |
173+
| parentIdField | String | pid | Set the parent id field. |
174+
| treeShowField | String | | Set the treeShowField will auto enable the tree grid. |
175+
| rootParentId | String | null | Set the root parent id. |
176+
| treeEnable | Boolean | false | Set true to enable the tree grid. |
177+
| stickyHeader | Boolean | false | Set true to use sticky header. |
178+
| clickColor | String | | Color displayed in the background when clicking on a line |
179+
| rowStyle | Function | {} | The row style formatter function, takes two parameters: row, index |
180+
| formatNoMatches | Function | '' | Set message when the rows array is empty |
180181
181182
## Events
182183
183-
| Name | Description | params |
184-
| --------------- | -------------------------------------------------------------------------------------------- | ------------------------------ |
185-
| onPostBody | It fires after the table body are rendered and available in the DOM. The parameters contain: | element treegrid |
186-
| onClickRow | It fires when the user clicks a row | Object: {row, $element, field} |
187-
| headerStyle | The header style formatter function | column |
188-
| formatNoMatches | -- | |
184+
| Name | Description | params |
185+
| -------------- | -------------------------------------------------------------------------------------------- | ------------------------------------- |
186+
| onPostBody | It fires after the table body are rendered and available in the DOM. The parameters contain: | element treegrid |
187+
| onClickRow | It fires when the user clicks a row | Object: {row, $element, field} |
188+
| onClickCell | It fires when the user clicks a cell | Object: {field, value, row, $element} |
189+
| onDblClickRow | It fires when the user double clicks a row | Object: {row, $element, field} |
190+
| onDblClickCell | It fires when the user double clicks a cell | Object: {field, value, row, $element} |
191+
| onExpandRow | It fires when you click the detail icon to expand the detail view | Object: { index, row, $detail} |
192+
| onCollapseRow | It fires when you click the detail icon to collapse the detail view | Object: {index, row, detailView} |
193+
| headerStyle | The header style formatter function | column |

0 commit comments

Comments
 (0)