👌 make dropdown list toggle on enter/click

This commit is contained in:
ghalestrilo 2020-07-30 16:16:47 -03:00
parent 7272afe184
commit ab93a4c85d

View file

@ -22,7 +22,7 @@ export const useModalBehavior = (hideOverlay) => {
// Return values // Return values
const setRef = (r) => { ref.current = r; }; const setRef = (r) => { ref.current = r; };
const [visible, setVisible] = useState(true); const [visible, setVisible] = useState(true);
const trigger = () => setVisible(true); const trigger = () => setVisible(!visible);
const hide = () => setVisible(false); const hide = () => setVisible(false);