diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridSingleSelectOptions.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridSingleSelectOptions.tsx index 1fece97012..7228252aab 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridSingleSelectOptions.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/grid/GridCell/GridSingleSelectOptions.tsx @@ -5,6 +5,7 @@ import { CellCache } from '@/appflowy_app/stores/effects/database/cell/cell_cach import { FieldController } from '@/appflowy_app/stores/effects/database/field/field_controller'; import { useCell } from '../../_shared/database-hooks/useCell'; import { SelectOptionCellDataPB } from '@/services/backend/models/flowy-database/select_type_option'; +import { CellOptionsPopup } from '../../_shared/EditRow/CellOptionsPopup'; export default function GridSingleSelectOptions({ cellIdentifier, @@ -21,15 +22,34 @@ export default function GridSingleSelectOptions({ const [value, setValue] = useState((data as SelectOptionCellDataPB) || ''); const [showOptionsPopup, setShowOptionsPopup] = useState(false); + const [changeOptionsTop, setChangeOptionsTop] = useState(0); + const [changeOptionsLeft, setChangeOptionsLeft] = useState(0); + + const onEditOptionsClick = async (left: number, top: number) => { + setChangeOptionsLeft(left); + setChangeOptionsTop(top); + setShowOptionsPopup(true); + }; useEffect(() => { if (data) setValue(data as SelectOptionCellDataPB); }, [data]); return ( <> -
- setShowOptionsPopup(!showOptionsPopup)} /> +
+
+ + {showOptionsPopup && ( + setShowOptionsPopup(false)} + /> + )} ); }