feat: clear all cells (#4856)

* feat: clear all cells

* fix: smaller dialog width

* fix: clippy warning
This commit is contained in:
Mathias Mogensen
2024-03-21 17:40:23 +01:00
committed by GitHub
parent c1006c18c3
commit e2e38f72bb
8 changed files with 147 additions and 7 deletions

View File

@ -62,6 +62,19 @@ class FieldBackendService {
return DatabaseEventDeleteField(payload).send();
}
// Clear all data of all cells in a Field
static Future<FlowyResult<void, FlowyError>> clearField({
required String viewId,
required String fieldId,
}) {
final payload = ClearFieldPayloadPB(
viewId: viewId,
fieldId: fieldId,
);
return DatabaseEventClearField(payload).send();
}
/// Duplicate a field
static Future<FlowyResult<void, FlowyError>> duplicateField({
required String viewId,