Description
DataViews supports adding actions that have modals. When a modal is open, it can be closed by pressing the Esc key, but only if the modal has a button that calls the closeModal on click.
Step-by-step reproduction instructions
Modify the DataViews story for render modals:
- Go to the DataViews story, where the render modal action is defined (link to code).
- Change
hideModalHeader to modalHeader: 'Delete action'.
- Remove the buttons from the RenderModal component.
Run the storybook:
npm install && npm run storybook:dev
- It'll automatically open a browser. Go to the DataViews default story at http://localhost:50240/?path=/docs/dataviews-dataviews--docs
- Open the "Delete item" action and verify that it has a header with a close button.
- Press the
Esc key in the keyboard. The expected result was that it closed the modal, but it didn't.
- Verify that pressing the
X button in the modal header does close the modal.

Description
DataViews supports adding actions that have modals. When a modal is open, it can be closed by pressing the
Esckey, but only if the modal has a button that calls thecloseModalon click.Step-by-step reproduction instructions
Modify the DataViews story for render modals:
hideModalHeadertomodalHeader: 'Delete action'.Run the storybook:
npm install && npm run storybook:devEsckey in the keyboard. The expected result was that it closed the modal, but it didn't.Xbutton in the modal header does close the modal.