mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: create kanban board row
This commit is contained in:
parent
5fb86c4002
commit
34cb2b2a09
@ -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);
|
||||
};
|
||||
|
@ -94,7 +94,7 @@ export class DatabaseGroupController {
|
||||
};
|
||||
|
||||
createRow = async () => {
|
||||
return this.databaseBackendSvc.createRow(this.group.group_id);
|
||||
return this.databaseBackendSvc.createRow({ groupId: this.group.group_id });
|
||||
};
|
||||
|
||||
subscribe = (callbacks: GroupDataCallbacks) => {
|
||||
|
Loading…
Reference in New Issue
Block a user