This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isArray(data: any): Boolean { | |
| return data && data.constructor === Array; | |
| } | |
| function isObject(data: any): Boolean { | |
| return data && data.constructor === Object; | |
| } | |
| function withoutEdgesAndNodes(data: any): any { | |
| let result = Array.isArray(data) ? [] : {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const handleKeyDown = useCallback( | |
| (event, firstInteractive, lastInteractive, close, handleSubmit) => { | |
| const { target, key, shiftKey } = event; | |
| if (key === "Tab" && shiftKey && target === firstInteractive) { | |
| event.preventDefault(); | |
| lastInteractive.focus(); | |
| } | |
| if (key === "Tab" && !shiftKey && target === lastInteractive) { |