Refactor the action a bit, the shouldIgnore looked a bit unreadable;
Implement active property to toggle listener when needed. For example, the action might be used to close the Modal on Escape key and the listener will be active when the Modal is closed;
shouldIgnore
looked a bit unreadable;active
property to toggle listener when needed. For example, the action might be used to close the Modal onEscape
key and the listener will be active when the Modal is closed;active
property;All tests are passed.