Skip to content

Commit

Permalink
Remove unnecessary onKeyDown from remove button
Browse files Browse the repository at this point in the history
This was unnecessary and caused the remove request to be called twice.
  • Loading branch information
kasperbirch1 committed Apr 25, 2024
1 parent d2cdb52 commit 6a0e261
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/apps/opening-hours-editor/DialogFormEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ const DialogFormEdit: React.FC<DialogFormEditProps> = ({
data-cy="opening-hours-editor-form__remove"
className="opening-hours-editor-form__remove"
type="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === "Enter") {
eventInfo.remove();
handleEventRemove(eventInfo.id);
closeDialog();
}
}}
onClick={() => {
eventInfo.remove();
handleEventRemove(eventInfo.id);
Expand Down

0 comments on commit 6a0e261

Please sign in to comment.