Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
feat/integrate single select options to grid
Mike Abebe6977e5e65c7e
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.tsxindex 7228252aab..8e764ad8dc 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@@ -1,4 +1,4 @@-import { useState, useEffect, useRef } from 'react';+import { useState } from 'react';import { CellOptions } from '../../_shared/EditRow/CellOptions';import { CellIdentifier } from '@/appflowy_app/stores/effects/database/cell/cell_bd_svc';import { CellCache } from '@/appflowy_app/stores/effects/database/cell/cell_cache';@@ -16,11 +16,8 @@ export default function GridSingleSelectOptions({cellCache: CellCache;fieldController: FieldController;}) {- const ref = useRef<HTMLDivElement>(null);+ const { data } = useCell(cellIdentifier, cellCache, fieldController);- const { data, cellController } = useCell(cellIdentifier, cellCache, fieldController);-- const [value, setValue] = useState((data as SelectOptionCellDataPB) || '');const [showOptionsPopup, setShowOptionsPopup] = useState(false);const [changeOptionsTop, setChangeOptionsTop] = useState(0);const [changeOptionsLeft, setChangeOptionsLeft] = useState(0);@@ -31,9 +28,6 @@ export default function GridSingleSelectOptions({setShowOptionsPopup(true);};- useEffect(() => {- if (data) setValue(data as SelectOptionCellDataPB);- }, [data]);return (<><div className='flex w-full cursor-pointer justify-start'>