|
@@ -39,10 +39,19 @@ export class DatabaseBackendService {
|
|
|
return FolderEventCloseView(payload);
|
|
|
};
|
|
|
|
|
|
- createRow = async (rowId?: string, groupId?: string) => {
|
|
|
- const payload = CreateRowPayloadPB.fromObject({ view_id: this.viewId, start_row_id: rowId ?? undefined });
|
|
|
- if (groupId !== undefined) {
|
|
|
- payload.group_id = groupId;
|
|
|
+ /// Create a row in database
|
|
|
+ /// 1.The row will be the last row in database if the params is undefined
|
|
|
+ /// 2.The row will be placed after the passed-in rowId
|
|
|
+ /// 3.The row will be moved to the group with groupId. Currently, grouping is
|
|
|
+ /// only support in kanban board.
|
|
|
+ createRow = async (params?: { rowId?: string; groupId?: string }) => {
|
|
|
+ const payload = CreateRowPayloadPB.fromObject({ view_id: this.viewId });
|
|
|
+ if (params?.rowId !== undefined) {
|
|
|
+ payload.start_row_id = params.rowId;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (params?.groupId !== undefined) {
|
|
|
+ payload.group_id = params.groupId;
|
|
|
}
|
|
|
return DatabaseEventCreateRow(payload);
|
|
|
};
|