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
{{ message }}
This repository was archived by the owner on Oct 24, 2019. It is now read-only.
[](https://github.com/nhn)
10
+
[](https://github.com/nhn)
11
11
12
12
## 🚩 Table of Contents
13
+
13
14
*[Collect statistics on the use of open source](#collect-statistics-on-the-use-of-open-source)
Load grid component and then add it to the `components`in your component or Vue instance.
89
93
94
+
> Tui-grid has its own reactivity system, and does not use the reactivity system ofvue. So, instead of adding props in the `data`, declare props in the `created` lifecycle method.
95
+
90
96
```js
91
97
import 'tui-grid/dist/tui-grid.css'
92
98
import { Grid } from '@toast-ui/vue-grid'
93
99
94
100
export default {
95
101
components: {
96
-
'grid': Grid
102
+
'grid': Grid
97
103
},
98
-
data() {
99
-
return {
104
+
created() {
105
+
this.options = {
100
106
rows: [ // for rowData prop
101
107
{
102
108
name: 'Beautiful Lies',
@@ -106,14 +112,14 @@ export default {
106
112
name: 'X',
107
113
artist: 'Ed Sheeran'
108
114
}
109
-
],
110
-
columns: [ // for columnData prop
115
+
],
116
+
columns: [ // for columnData prop
111
117
{
112
-
title: 'Name',
118
+
header: 'Name',
113
119
name: 'name',
114
120
},
115
121
{
116
-
title: 'Artist',
122
+
header: 'Artist',
117
123
name: 'artist'
118
124
}
119
125
]
@@ -172,19 +178,16 @@ You can use `rowData`, `columnData`, `options`, `theme` and `language` props. Ex
172
178
* mouseout : Occurs when a mouse pointer is moved off from the Grid.
173
179
* mousedown : Occurs when a mouse button is downed on the Grid.
174
180
* focusChange : Occurs when focused cell is about to change.
175
-
* expanded : Occurs when the row having child rows is expanded.
176
-
* expandedAll : Occurs when all rows having child rows are expanded.
177
-
* collapsed : Occurs when the row having child rows is collapsed.
178
-
* collapsedAll : Occurs when all rows having child rows are expanded.
181
+
* expande : Occurs when the row having child rows is expanded.
182
+
* collapse : Occurs when the row having child rows is collapsed.
179
183
* beforeRequest : Occurs before the http request is sent.
180
184
* response : Occurs when the response is received from the server.
181
185
* successResponse : Occurs after the response event, if the result is true.
182
186
* failResponse : Occurs after the response event, if the result is false.
183
187
* errorResponse : Occurs after the response event, if the response is Error.
184
188
* selection : Occurs when selecting cells.
185
-
* deleteRange : Occurs when cells are deleted by 'del' key.
186
189
187
-
For more information such as the parameters of each event, see [eventoftui.grid](https://nhnent.github.io/tui.grid/api/Grid.html). Example of event is in the [Getting Started](https://github.com/nhnent/toast-ui.vue-grid/blob/master/docs/getting-started.md#event).
190
+
For more information such as the parameters of each event, see [eventoftui.grid](https://nhn.github.io/tui.grid/latest/Grid). Example of event is in the [Getting Started](https://github.com/nhn/toast-ui.vue-grid/blob/master/docs/getting-started.md#event).
188
191
189
192
### Method
190
193
@@ -241,9 +244,6 @@ If it has no error, commit and then push it!
241
244
242
245
For more information on PR's step, please see links of Contributing section.
0 commit comments