From 44585079b6d67ffc4de61e4a974683e33eb5a37e Mon Sep 17 00:00:00 2001 From: ascarbek Date: Sun, 9 Apr 2023 18:38:18 +0600 Subject: [PATCH] chore: import reorganize and edit option on grid --- .../_shared/EditRow/CellOptionsPopup.tsx | 10 ++---- .../_shared/EditRow/EditCellOptionPopup.tsx | 22 ++++++------ .../_shared/EditRow/EditCellWrapper.tsx | 9 ++--- .../components/_shared/EditRow/EditRow.tsx | 2 -- .../appflowy_app/components/board/Board.tsx | 1 - .../board/BoardGroupFieldsPopup.tsx | 1 - .../components/board/BoardOptionsCell.tsx | 2 +- .../components/board/BoardUrlCell.tsx | 8 ++--- .../components/grid/Grid/Grid.tsx | 2 +- .../grid/GridAddView/GridAddView.tsx | 1 - .../components/grid/GridCell/GridCell.tsx | 3 -- .../components/grid/GridCell/GridDate.tsx | 4 +-- .../grid/GridCell/GridSingleSelectOptions.tsx | 34 ++++++++++++++++--- .../components/grid/GridCell/GridUrl.tsx | 6 +--- .../GridTableCount/GridTableCount.hooks.ts | 2 +- .../GridTableHeader/GridTableHeader.hooks.tsx | 2 +- .../grid/GridTableRows/GridTableRow.tsx | 1 - 17 files changed, 55 insertions(+), 55 deletions(-) diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/CellOptionsPopup.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/CellOptionsPopup.tsx index fd2f145609..6df9271520 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/CellOptionsPopup.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/CellOptionsPopup.tsx @@ -72,11 +72,7 @@ export const CellOptionsPopup = ({ }; const onToggleOptionClick = async (option: SelectOptionPB) => { - if ( - (data as SelectOptionCellDataPB | undefined)?.select_options?.find( - (selectedOption) => selectedOption.id === option.id - ) - ) { + if ((data as SelectOptionCellDataPB)?.select_options?.find((selectedOption) => selectedOption.id === option.id)) { await new SelectOptionCellBackendService(cellIdentifier).unselectOption([option.id]); } else { await new SelectOptionCellBackendService(cellIdentifier).selectOption([option.id]); @@ -121,7 +117,7 @@ export const CellOptionsPopup = ({
- {(data as SelectOptionCellDataPB | undefined)?.select_options?.map((option, index) => ( + {(data as SelectOptionCellDataPB)?.select_options?.map((option, index) => (
{option?.name || ''}