Remove solution of christian to implement more general way
This commit is contained in:
parent
bf75bdbd59
commit
721d04a729
1 changed files with 37 additions and 46 deletions
|
|
@ -26,15 +26,7 @@ export default function DictAreaModal({
|
|||
if (value) ref.current = value;
|
||||
}, [ref]);
|
||||
|
||||
//This code prevents delete Node and close modal when user press backspace key
|
||||
const handleKeyDown = (event) => {
|
||||
if (event.code === "Backspace") {
|
||||
event.stopPropagation();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div onKeyDown={handleKeyDown} className="h-full w-full">
|
||||
<BaseModal size="medium-h-full" open={open} setOpen={setOpen}>
|
||||
<BaseModal.Trigger>{children}</BaseModal.Trigger>
|
||||
<BaseModal.Header description={CODE_DICT_DIALOG_SUBTITLE}>
|
||||
|
|
@ -46,7 +38,7 @@ export default function DictAreaModal({
|
|||
/>
|
||||
</BaseModal.Header>
|
||||
<BaseModal.Content>
|
||||
<div className="nopan nodelete nodrag noundo nocopy flex h-full w-full flex-col transition-all ">
|
||||
<div className="flex h-full w-full flex-col transition-all ">
|
||||
<JsonView
|
||||
theme="vscode"
|
||||
dark={true}
|
||||
|
|
@ -75,6 +67,5 @@ export default function DictAreaModal({
|
|||
</div>
|
||||
</BaseModal.Content>
|
||||
</BaseModal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue