mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
feat(base): add save and cancel buttons to property rename panel
This commit is contained in:
@@ -194,8 +194,20 @@ export function PropertyMenuContent({
|
|||||||
value={renameValue}
|
value={renameValue}
|
||||||
onChange={(e) => setRenameValue(e.currentTarget.value)}
|
onChange={(e) => setRenameValue(e.currentTarget.value)}
|
||||||
onKeyDown={handleRenameKeyDown}
|
onKeyDown={handleRenameKeyDown}
|
||||||
onBlur={commitRename}
|
|
||||||
/>
|
/>
|
||||||
|
<Divider />
|
||||||
|
<Group justify="flex-end" gap="xs">
|
||||||
|
<Button variant="default" size="xs" onClick={onClose}>
|
||||||
|
{t("Cancel")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
size="xs"
|
||||||
|
onClick={handleRenameAndClose}
|
||||||
|
disabled={!renameValue.trim() || renameValue.trim() === property.name}
|
||||||
|
>
|
||||||
|
{t("Save")}
|
||||||
|
</Button>
|
||||||
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
)}
|
)}
|
||||||
{(panel === "options" || panel === "confirmDiscard") && (
|
{(panel === "options" || panel === "confirmDiscard") && (
|
||||||
|
|||||||
Reference in New Issue
Block a user