Skip to content

Commit

Permalink
feature/ADH-5180 review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
workNpp committed Nov 1, 2024
1 parent 4b59e25 commit 0a0169e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const RuleCreateDialog: React.FC = () => {
dispatch(createRuleWithUpdate(ruleText));
};

const keyPress = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (e.shiftKey && e.key === 'Enter') {
e.preventDefault();
handleCreate();
Expand All @@ -62,7 +62,12 @@ const RuleCreateDialog: React.FC = () => {
actionButtonLabel="Create"
onAction={handleCreate}
>
<MultilineInput onKeyDown={keyPress} value={ruleText} onChange={handleChange} disabled={isActionInProgress} />
<MultilineInput
onKeyDown={handleKeyDown}
value={ruleText}
onChange={handleChange}
disabled={isActionInProgress}
/>
{isActionInProgress && <SpinnerPanel />}
</FooterDialog>
);
Expand Down

0 comments on commit 0a0169e

Please sign in to comment.