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
fix: save url cell
ascarbekb9e49f109dc8
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsxindex 9b7e62c0f8..6c7d7b1851 100644--- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsx+++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsx@@ -10,34 +10,22 @@ export const EditCellUrl = ({data: URLCellDataPB | undefined;cellController: CellController<any, any>;}) => {- const [url, setUrl] = useState('');- const [content, setContent] = useState('');+ const [value, setValue] = useState('');useEffect(() => {- setUrl((data as URLCellDataPB)?.url || '');+ setValue((data as URLCellDataPB)?.url || '');}, [data]);const save = async () => {- await (cellController as URLCellController)?.saveCellData(url);- // console.log('saving url');+ await (cellController as URLCellController)?.saveCellData(value);};return (- <div className={'flex flex-col px-4 py-2'}>- <label className={'mb-1'}>URL:</label>- <input- value={url}- onChange={(e) => setUrl(e.target.value)}- className={'-mx-2 mb-4 rounded bg-white px-2 py-1'}- onBlur={() => save()}- />- <label className={'mb-1'}>Content:</label>- <input- value={content}- onChange={(e) => setContent(e.target.value)}- className={'-mx-2 mb-2 rounded bg-white px-2 py-1'}- onBlur={() => save()}- />- </div>+ <input+ value={value}+ onChange={(e) => setValue(e.target.value)}+ onBlur={() => save()}+ className={'w-full px-4 py-2'}+ ></input>);};