mirror of https://github.com/usememos/memos.git
Fixed issue #5576 where clicking the edit button on a shortcut would incorrectly open a create dialog instead of an edit dialog. The root cause was an incorrect useEffect that was watching the shortcut state itself instead of the initialShortcut prop. When the dialog was opened for editing, the state wasn't properly reinitializing with the existing shortcut data. Changed the useEffect to: - Watch initialShortcut as the dependency - Reinitialize the shortcut state when initialShortcut changes - Properly distinguishes between create (initialShortcut undefined) and edit (initialShortcut has data) modes |
||
|---|---|---|
| .. | ||
| docs | ||
| public | ||
| src | ||
| .gitignore | ||
| biome.json | ||
| components.json | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||
| vite.config.mts | ||