diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellWrapper.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellWrapper.tsx
index 3e50839f77..f3905ae230 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellWrapper.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellWrapper.tsx
@@ -69,10 +69,7 @@ export const EditCellWrapper = ({
cellIdentifier.fieldType === FieldType.MultiSelect ||
cellIdentifier.fieldType === FieldType.Checklist) &&
cellController && (
-
+
)}
{cellIdentifier.fieldType === FieldType.Checkbox && cellController && (
@@ -83,7 +80,7 @@ export const EditCellWrapper = ({
)}
{cellIdentifier.fieldType === FieldType.DateTime && (
-
+
)}
{cellIdentifier.fieldType === FieldType.Number && cellController && (
@@ -91,7 +88,7 @@ export const EditCellWrapper = ({
)}
{cellIdentifier.fieldType === FieldType.URL && cellController && (
-
+
)}
{cellIdentifier.fieldType === FieldType.RichText && cellController && (
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditRow.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditRow.tsx
index eb4e42140a..632bda7a58 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditRow.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditRow.tsx
@@ -235,8 +235,6 @@ export const EditRow = ({
left={editCellOptionLeft}
cellIdentifier={editingCell}
editingSelectOption={editingSelectOption}
- cellCache={controller.databaseViewCache.getRowCache().getCellCache()}
- fieldController={controller.fieldController}
onOutsideClick={() => {
setShowEditCellOption(false);
}}
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/Board.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/Board.tsx
index 7cc577632a..2e73a0170c 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/board/Board.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/Board.tsx
@@ -1,4 +1,3 @@
-import { SettingsSvg } from '../_shared/svg/SettingsSvg';
import { SearchInput } from '../_shared/SearchInput';
import { BoardGroup } from './BoardGroup';
import { NewBoardBlock } from './NewBoardBlock';
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardGroupFieldsPopup.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardGroupFieldsPopup.tsx
index 8052768a8b..502e92a0e1 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardGroupFieldsPopup.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardGroupFieldsPopup.tsx
@@ -2,7 +2,6 @@ import { useAppSelector } from '$app/stores/store';
import { FieldTypeIcon } from '$app/components/_shared/EditRow/FieldTypeIcon';
import { useRef } from 'react';
import useOutsideClick from '$app/components/_shared/useOutsideClick';
-import { EyeOpenSvg } from '$app/components/_shared/svg/EyeOpenSvg';
import { CheckmarkSvg } from '$app/components/_shared/svg/CheckmarkSvg';
export const BoardGroupFieldsPopup = ({ hidePopup }: { hidePopup: () => void }) => {
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardOptionsCell.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardOptionsCell.tsx
index 94981f6e3c..c35e1a83f4 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardOptionsCell.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardOptionsCell.tsx
@@ -18,7 +18,7 @@ export const BoardOptionsCell = ({
return (
- {(data as SelectOptionCellDataPB | undefined)?.select_options?.map((option, index) => (
+ {(data as SelectOptionCellDataPB)?.select_options?.map((option, index) => (
{option?.name || ''}
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardUrlCell.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardUrlCell.tsx
index 301a475b3d..940facef77 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardUrlCell.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardUrlCell.tsx
@@ -17,12 +17,8 @@ export const BoardUrlCell = ({
return (
<>
-
- {(data as URLCellDataPB | undefined)?.content || ''}
+
+ {(data as URLCellDataPB).content || ''}
>
);
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx
index 2bd108cb55..69bd3e7a0e 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/Grid/Grid.tsx
@@ -1,4 +1,4 @@
-import { useDatabase } from '../../_shared/database-hooks/useDatabase';
+import { useDatabase } from '$app/components/_shared/database-hooks/useDatabase';
import { GridTableCount } from '../GridTableCount/GridTableCount';
import { GridTableHeader } from '../GridTableHeader/GridTableHeader';
import { GridAddRow } from '../GridTableRows/GridAddRow';
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridAddView/GridAddView.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridAddView/GridAddView.tsx
index 12dacbb4ef..0b1f7d43b3 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridAddView/GridAddView.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridAddView/GridAddView.tsx
@@ -1,4 +1,3 @@
-import { Link } from 'react-router-dom';
import AddSvg from '../../_shared/svg/AddSvg';
export const GridAddView = () => {
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridCell.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridCell.tsx
index 62e75e6d81..ff825aa44a 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridCell.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridCell.tsx
@@ -2,9 +2,6 @@ import { CellIdentifier } from '@/appflowy_app/stores/effects/database/cell/cell
import { CellCache } from '@/appflowy_app/stores/effects/database/cell/cell_cache';
import { FieldController } from '@/appflowy_app/stores/effects/database/field/field_controller';
import { FieldType } from '@/services/backend';
-import { BoardDateCell } from '../../board/BoardDateCell';
-import { BoardUrlCell } from '../../board/BoardUrlCell';
-
import GridSingleSelectOptions from './GridSingleSelectOptions';
import GridTextCell from './GridTextCell';
import { GridCheckBox } from './GridCheckBox';
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridDate.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridDate.tsx
index 366d7c925a..ae64beaa7d 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridDate.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridDate.tsx
@@ -30,9 +30,7 @@ export const GridDate = ({
return (
- {cellController && (
-
- )}
+ {cellController &&
}
{showDatePopup && (
();
+
const onEditOptionsClick = async (left: number, top: number) => {
setChangeOptionsLeft(left);
setChangeOptionsTop(top);
setShowOptionsPopup(true);
};
+ const onOpenOptionDetailClick = (_left: number, _top: number, _select_option: SelectOptionPB) => {
+ setEditingSelectOption(_select_option);
+ setShowEditCellOption(true);
+ setEditCellOptionLeft(_left);
+ setEditCellOptionTop(_top);
+ };
+
return (
<>
@@ -42,8 +56,20 @@ export default function GridSingleSelectOptions({
cellCache={cellCache}
fieldController={fieldController}
onOutsideClick={() => setShowOptionsPopup(false)}
+ openOptionDetail={onOpenOptionDetailClick}
/>
)}
+ {showEditCellOption && editingSelectOption && (
+ {
+ setShowEditCellOption(false);
+ }}
+ >
+ )}
>
);
}
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridUrl.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridUrl.tsx
index 1e66c4d2e7..00bf66f11f 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridUrl.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridUrl.tsx
@@ -17,10 +17,6 @@ export const GridUrl = ({
const { data, cellController } = useCell(cellIdentifier, cellCache, fieldController);
return (
- <>
- {cellController && (
-
- )}
- >
+ <>{cellController && }>
);
};
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.hooks.ts b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.hooks.ts
index 3e51c526ac..a2ef86a55f 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.hooks.ts
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableCount/GridTableCount.hooks.ts
@@ -1,4 +1,4 @@
-import { useAppSelector } from '../../../stores/store';
+import { useAppSelector } from '$app/stores/store';
export const useGridTableCount = () => {
const { grid } = useAppSelector((state) => state);
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableHeader/GridTableHeader.hooks.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableHeader/GridTableHeader.hooks.tsx
index f88e00b188..9d849412a4 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableHeader/GridTableHeader.hooks.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableHeader/GridTableHeader.hooks.tsx
@@ -1,4 +1,4 @@
-import { useAppSelector } from '../../../stores/store';
+import { useAppSelector } from '$app/stores/store';
import { DatabaseController } from '@/appflowy_app/stores/effects/database/database_controller';
import { TypeOptionController } from '@/appflowy_app/stores/effects/database/field/type_option/type_option_controller';
import { None } from 'ts-results';
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableRows/GridTableRow.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableRows/GridTableRow.tsx
index f15afb2eab..36ae1e83eb 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableRows/GridTableRow.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridTableRows/GridTableRow.tsx
@@ -17,7 +17,6 @@ export const GridTableRow = ({
}) => {
const { cells } = useRow(viewId, controller, row);
- console.log({ cells });
return (
{cells.map((cell, cellIndex) => {