From 4545410703af8696a449492393fc9e635b81fe40 Mon Sep 17 00:00:00 2001 From: ascarbek Date: Thu, 23 Mar 2023 00:04:51 +0600 Subject: [PATCH] chore: column rename --- .../components/board/BoardTextCell.tsx | 6 +- .../board/EditBoardRow/EditCellText.tsx | 17 ++-- .../board/EditBoardRow/EditCellWrapper.tsx | 43 +++++----- .../board/EditBoardRow/EditFieldPopup.tsx | 80 +++++++++++++++++++ .../components/board/EditBoardRow/EditRow.tsx | 7 +- .../board/EditBoardRow/FieldTypeIcon.tsx | 24 ++++++ .../board/EditBoardRow/FieldTypeName.tsx | 18 +++++ frontend/appflowy_tauri/tailwind.config.cjs | 3 + 8 files changed, 162 insertions(+), 36 deletions(-) create mode 100644 frontend/appflowy_tauri/src/appflowy_app/components/board/EditBoardRow/EditFieldPopup.tsx create mode 100644 frontend/appflowy_tauri/src/appflowy_app/components/board/EditBoardRow/FieldTypeIcon.tsx create mode 100644 frontend/appflowy_tauri/src/appflowy_app/components/board/EditBoardRow/FieldTypeName.tsx diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardTextCell.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardTextCell.tsx index dd9c517dee..bc95074e37 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardTextCell.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardTextCell.tsx @@ -1,6 +1,6 @@ -import { CellIdentifier } from '../../stores/effects/database/cell/cell_bd_svc'; -import { CellCache } from '../../stores/effects/database/cell/cell_cache'; -import { FieldController } from '../../stores/effects/database/field/field_controller'; +import { CellIdentifier } from '$app/stores/effects/database/cell/cell_bd_svc'; +import { CellCache } from '$app/stores/effects/database/cell/cell_cache'; +import { FieldController } from '$app/stores/effects/database/field/field_controller'; import { useCell } from '../_shared/database-hooks/useCell'; export const BoardTextCell = ({ diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/EditBoardRow/EditCellText.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/EditBoardRow/EditCellText.tsx index d7813f8bb7..bc36f35ecf 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/board/EditBoardRow/EditCellText.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/EditBoardRow/EditCellText.tsx @@ -9,7 +9,7 @@ export const EditCellText = ({ data, cellController }: { data: string; cellContr }, [data]); useEffect(() => { - setContentRows(Math.max(1, value.split('\n').length)); + setContentRows(Math.max(1, (value || '').split('\n').length)); }, [value]); const onTextFieldChange = async (v: string) => { @@ -21,13 +21,12 @@ export const EditCellText = ({ data, cellController }: { data: string; cellContr }; return ( -
-