@kissflow/lowcode-client-sdk 1.0.19 → 1.0.20
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/README.md +25 -9
- package/dist/index.d.ts +1 -0
- package/dist/kf.lowcodeworkersdk.es.js +7 -1
- package/dist/kf.nocodeworkersdk.es.js +7 -1
- package/dist/lowcode.d.ts +1 -0
- package/dist/lowcode.types.d.ts +1 -0
- package/dist/nocode.d.ts +1 -0
- package/dist/nocode.types.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -139,6 +139,7 @@ Appends row details to the table.
|
|
|
139
139
|
const table = kf.context.getTable(tableId);
|
|
140
140
|
table.addRow({ columnId1: value, columnId2: value });
|
|
141
141
|
```
|
|
142
|
+
> ##### Note: If there are more than one rows to be added to table then use `addRows()` instead for these bulk operations
|
|
142
143
|
|
|
143
144
|
#### b) addRows()
|
|
144
145
|
|
|
@@ -148,11 +149,14 @@ Appends multiple rows details to the table.
|
|
|
148
149
|
###### Syntax:
|
|
149
150
|
```js
|
|
150
151
|
const table = kf.context.getTable(tableId);
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{
|
|
154
|
-
|
|
155
|
-
]
|
|
152
|
+
let accumulator = [];
|
|
153
|
+
someArrayOfObjects.forEach(function(rowDetail) {
|
|
154
|
+
accumulator.push({
|
|
155
|
+
columnId1: rowDetail[columnId1],
|
|
156
|
+
columnId2: rowDetail[columnId2]
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
await table.addRows(accumulator);
|
|
156
160
|
```
|
|
157
161
|
|
|
158
162
|
#### c) deleteRow()
|
|
@@ -163,10 +167,22 @@ Deletes a row from the table based on the row id
|
|
|
163
167
|
###### Syntax:
|
|
164
168
|
```js
|
|
165
169
|
const table = kf.context.getTable(tableId);
|
|
166
|
-
table.deleteRow(rowId);
|
|
170
|
+
await table.deleteRow(rowId);
|
|
171
|
+
```
|
|
172
|
+
> ##### Note: If there are more than one rows to be deleted then use `deleteRows()` instead.
|
|
173
|
+
|
|
174
|
+
#### d) deleteRows()
|
|
175
|
+
|
|
176
|
+
###### Description:
|
|
177
|
+
Deletes multiple rows from the table based on given array of strings.
|
|
178
|
+
|
|
179
|
+
###### Syntax:
|
|
180
|
+
```js
|
|
181
|
+
const table = kf.context.getTable(tableId);
|
|
182
|
+
await table.deleteRows([rowId1, rowId2, rowId3]);
|
|
167
183
|
```
|
|
168
184
|
|
|
169
|
-
####
|
|
185
|
+
#### e) getRow()
|
|
170
186
|
|
|
171
187
|
###### Description:
|
|
172
188
|
Use this function to perform form actions on any row inside a child table
|
|
@@ -180,7 +196,7 @@ const row = table.getRow(rowId);
|
|
|
180
196
|
###### Output:
|
|
181
197
|
Returns an instance of `TableForm` class
|
|
182
198
|
|
|
183
|
-
####
|
|
199
|
+
#### f) getRows()
|
|
184
200
|
|
|
185
201
|
###### Description:
|
|
186
202
|
Gets all the rows of the table
|
|
@@ -193,7 +209,7 @@ const rows = await kf.context.getTable(tableId).getRows();
|
|
|
193
209
|
###### Output:
|
|
194
210
|
Returns an array of `TableForm` instances
|
|
195
211
|
|
|
196
|
-
#####
|
|
212
|
+
##### g) toJSON()
|
|
197
213
|
|
|
198
214
|
###### Description:
|
|
199
215
|
Use this function to get the JSON data of the child table
|
package/dist/index.d.ts
CHANGED
|
@@ -259,7 +259,13 @@ class Table extends BaseSDK {
|
|
|
259
259
|
deleteRow(rowId) {
|
|
260
260
|
return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
|
|
261
261
|
tableId: this.tableId,
|
|
262
|
-
rowId
|
|
262
|
+
rows: [rowId]
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
deleteRows(rows) {
|
|
266
|
+
return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
|
|
267
|
+
tableId: this.tableId,
|
|
268
|
+
rows
|
|
263
269
|
});
|
|
264
270
|
}
|
|
265
271
|
}
|
|
@@ -248,7 +248,13 @@ class Table extends BaseSDK {
|
|
|
248
248
|
deleteRow(rowId) {
|
|
249
249
|
return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
|
|
250
250
|
tableId: this.tableId,
|
|
251
|
-
rowId
|
|
251
|
+
rows: [rowId]
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
deleteRows(rows) {
|
|
255
|
+
return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
|
|
256
|
+
tableId: this.tableId,
|
|
257
|
+
rows
|
|
252
258
|
});
|
|
253
259
|
}
|
|
254
260
|
}
|
package/dist/lowcode.d.ts
CHANGED
package/dist/lowcode.types.d.ts
CHANGED
package/dist/nocode.d.ts
CHANGED
package/dist/nocode.types.d.ts
CHANGED