Skip to content

Commit ad31c58

Browse files
committed
updated art to v0.1.5
1 parent 8722d43 commit ad31c58

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

frameworks/keyed/art/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/art/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"vite": "2.7.2"
1616
},
1717
"dependencies": {
18-
"js-art": "0.1.4"
18+
"js-art": "0.1.5"
1919
}
2020
}

frameworks/keyed/art/src/main.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ class Main extends art.Component {
119119

120120
switch (action.type) {
121121
case 'RUN':
122-
return this.setData({ data: buildData(1000), selected: 0 });
122+
return this.setDataNow({ data: buildData(1000), selected: 0 });
123123
case 'RUN_LOTS':
124-
return this.setData({ data: buildData(10000), selected: 0 });
124+
return this.setDataNow({ data: buildData(10000), selected: 0 });
125125
case 'ADD':
126-
return this.setData({ data: data.concat(buildData(1000))});
126+
return this.setDataNow({ data: data.concat(buildData(1000))});
127127
case 'UPDATE': {
128128
const newData = data.slice(0);
129129

@@ -133,24 +133,24 @@ class Main extends art.Component {
133133
newData[i] = { id: r.id, label: r.label + " !!!" };
134134
}
135135

136-
return this.setData({ data: newData });
136+
return this.setDataNow({ data: newData });
137137
}
138138
case 'CLEAR':
139-
return this.setData({ data: [], selected: 0 });
139+
return this.setDataNow({ data: [], selected: 0 });
140140
case 'SWAP_ROWS': {
141141
if (data.length > 998) {
142-
return this.setData({ data: [data[0], data[998], ...data.slice(2, 998), data[1], data[999]] });
142+
return this.setDataNow({ data: [data[0], data[998], ...data.slice(2, 998), data[1], data[999]] });
143143
}
144144

145145
return;
146146
}
147147
case 'REMOVE': {
148148
const idx = data.findIndex((d) => d.id === action.id);
149149

150-
return this.setData({ data: [...data.slice(0, idx), ...data.slice(idx + 1)] });
150+
return this.setDataNow({ data: [...data.slice(0, idx), ...data.slice(idx + 1)] });
151151
}
152152
case 'SELECT':
153-
return this.setData({ selected: action.id });
153+
return this.setDataNow({ selected: action.id });
154154
}
155155
};
156156
}

frameworks/non-keyed/art/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/non-keyed/art/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"vite": "2.7.2"
1616
},
1717
"dependencies": {
18-
"js-art": "0.1.4"
18+
"js-art": "0.1.5"
1919
}
2020
}

frameworks/non-keyed/art/src/main.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ class Main extends art.Component {
8888
};
8989

9090
run = () => {
91-
this.setData({ data: buildData(1000), selected: 0 });
91+
this.setDataNow({ data: buildData(1000), selected: 0 });
9292
}
9393

9494
runLots = () => {
95-
this.setData({ data: buildData(10000), selected: 0 });
95+
this.setDataNow({ data: buildData(10000), selected: 0 });
9696
}
9797

9898
add = () => {
99-
this.setData({ data: this.data.data.concat(buildData(1000)) });
99+
this.setDataNow({ data: this.data.data.concat(buildData(1000)) });
100100
}
101101

102102
update = () => {
@@ -109,7 +109,7 @@ class Main extends art.Component {
109109
}
110110

111111
select = (item) => {
112-
this.setData({ selected: item.id });
112+
this.setDataNow({ selected: item.id });
113113
}
114114

115115
remove = (item) => {
@@ -119,7 +119,7 @@ class Main extends art.Component {
119119
}
120120

121121
clear = () => {
122-
this.setData({ data: [], selected: 0 });
122+
this.setDataNow({ data: [], selected: 0 });
123123
}
124124

125125
swapRows = () => {

0 commit comments

Comments
 (0)