native-document 1.0.145 → 1.0.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -183,16 +183,17 @@ export const buildTBody = ($desc, instance, visibleColumns) => {
|
|
|
183
183
|
tbody.children[args[0]]?.remove();
|
|
184
184
|
},
|
|
185
185
|
swap: (args) => {
|
|
186
|
-
const [a, b]
|
|
187
|
-
const
|
|
188
|
-
const elA
|
|
189
|
-
const elB
|
|
186
|
+
const [a, b] = args;
|
|
187
|
+
const children = tbody.children;
|
|
188
|
+
const elA = children[a];
|
|
189
|
+
const elB = children[b];
|
|
190
190
|
if(!elA || !elB) {
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
const refB
|
|
193
|
+
const refB = elB.nextSibling;
|
|
194
|
+
console.log(refB)
|
|
195
|
+
tbody.insertBefore(elB, elA);
|
|
194
196
|
tbody.insertBefore(elA, refB);
|
|
195
|
-
tbody.insertBefore(elB, rows[a]);
|
|
196
197
|
},
|
|
197
198
|
clear: () => {
|
|
198
199
|
tbody.innerHTML = '';
|
|
@@ -76,9 +76,9 @@ const buildBody = ($desc, instance, visibleColumns) => {
|
|
|
76
76
|
|
|
77
77
|
return fragment;
|
|
78
78
|
},
|
|
79
|
-
set: (
|
|
79
|
+
set: () => {
|
|
80
80
|
mutations.clear()
|
|
81
|
-
mutations.push(
|
|
81
|
+
mutations.push($desc.data.val());
|
|
82
82
|
},
|
|
83
83
|
push: (args) => {
|
|
84
84
|
tbody.append(mutations.toFragment(args));
|
|
@@ -104,15 +104,16 @@ const buildBody = ($desc, instance, visibleColumns) => {
|
|
|
104
104
|
},
|
|
105
105
|
swap: (args) => {
|
|
106
106
|
const [a, b] = args;
|
|
107
|
-
const
|
|
108
|
-
const elA =
|
|
109
|
-
const elB =
|
|
107
|
+
const children = tbody.children;
|
|
108
|
+
const elA = children[a];
|
|
109
|
+
const elB = children[b];
|
|
110
110
|
if(!elA || !elB) {
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
const refB = elB.nextSibling;
|
|
114
|
+
console.log(refB)
|
|
115
|
+
tbody.insertBefore(elB, elA);
|
|
114
116
|
tbody.insertBefore(elA, refB);
|
|
115
|
-
tbody.insertBefore(elB, rows[a]);
|
|
116
117
|
},
|
|
117
118
|
clear: () => {
|
|
118
119
|
tbody.innerHTML = '';
|