Commit eae50bcc authored by Muhammadali's avatar Muhammadali

update-

parent fe454ed6
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "4.6.0", "version": "4.6.1",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -6,6 +6,9 @@ import { Text, useTranslator } from '@eo-locale/react'; ...@@ -6,6 +6,9 @@ import { Text, useTranslator } from '@eo-locale/react';
const DropDown = ({ reasons, reason, selectFunc }) => { const DropDown = ({ reasons, reason, selectFunc }) => {
const translator = useTranslator(); const translator = useTranslator();
const [visible, setVisible] = useState(0); const [visible, setVisible] = useState(0);
document.querySelector('body').addEventListener('click', function (e) {
if (Boolean(visible)) setVisible(0);
});
return ( return (
<DropDownStyle <DropDownStyle
onClick={() => setVisible(visible ? 0 : 1)} onClick={() => setVisible(visible ? 0 : 1)}
...@@ -35,10 +38,10 @@ const DropDown = ({ reasons, reason, selectFunc }) => { ...@@ -35,10 +38,10 @@ const DropDown = ({ reasons, reason, selectFunc }) => {
</div> </div>
))} ))}
</DropDownStyle.DropDown> </DropDownStyle.DropDown>
<DropDownStyle.Window {/* <DropDownStyle.Window
visiblevalue={visible} visiblevalue={visible}
onClick={() => setVisible(0)} onClick={() => setVisible(0)}
/> /> */}
</DropDownStyle> </DropDownStyle>
); );
}; };
......
...@@ -210,10 +210,9 @@ const ModalPhoneNumpad = ({ ...@@ -210,10 +210,9 @@ const ModalPhoneNumpad = ({
setNumberSelectHistory('zero'); setNumberSelectHistory('zero');
}; };
document.querySelector('body').addEventListener('click', () => { document.querySelector('body').addEventListener('click', function (e) {
console.log('body_clicked'); if (exNum) setExNum(false);
}); });
return ( return (
<ModalPhoneNumpadStyle <ModalPhoneNumpadStyle
position={position} position={position}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment