Commit 6867ede9 authored by Muhammadali's avatar Muhammadali

update-

parent 5fffbeb7
{
"name": "boxdialer",
"version": "2.9.9",
"version": "3.0.0",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -10,39 +10,35 @@ const CallHistoryInputDropdown = ({
numberSelectHistory,
setDefaultHistoryNumberHistory,
}) => {
const [modal, setModal] = useState(false);
var elem = document.getElementById('data');
// const [modal, setModal] = useState(false);
// var elem = document.getElementById('data');
// const selectFuncInset = (e) => {
// selectFunc(e);
// setModal(false);
// };
// useEffect(() => {
// if (call_history.length) {
// elem.scrollTop = elem.scrollHeight;
// if (numberSelectHistory == 0 || numberSelectHistory == 'zero') {
// elem.scrollTop = elem.scrollHeight;
// } else {
// elem.scrollTop = elem.scrollHeight - numberSelectHistory * 50;
// }
// }
// }, []);
const selectFuncInset = (e) => {
selectFunc(e);
setModal(false);
};
useEffect(() => {
if (call_history.length) {
if (numberSelectHistory == 0 || numberSelectHistory == 'zero') {
elem.scrollTop = elem.scrollHeight;
} else {
elem.scrollTop = elem.scrollHeight - numberSelectHistory * 50;
}
}
}, [numberSelectHistory]);
// }, [numberSelectHistory]);
useEffect(() => {
if (numberSelectHistory > 0) {
setModal(true);
} else if (numberSelectHistory == 0 || numberSelectHistory == 'zero') {
setModal(false);
}
}, [numberSelectHistory]);
// useEffect(() => {
// if (numberSelectHistory > 0) {
// setModal(true);
// } else if (numberSelectHistory == 0 || numberSelectHistory == 'zero') {
// setModal(false);
// }
// }, [numberSelectHistory]);
return (
<Block>
<Input
{/* <Input
onClick={() => {
setDefaultHistoryNumberHistory();
setModal(!modal);
......@@ -73,7 +69,7 @@ const CallHistoryInputDropdown = ({
onClick={() => setModal(!modal)}
/>
</>
)}
)} */}
</Block>
);
};
......
......@@ -81,14 +81,11 @@ const ModalPhoneNumpad = ({
(type === 'up' && numberSelectHistory < call_history.length) ||
numberSelectHistory === 'zero'
) {
console.log('numberSelectHistory: ', numberSelectHistory);
setNumberSelectHistory(
numberSelectHistory !== 'zero' ? numberSelectHistory + 1 : 0 + 1,
);
}
if (type === 'down' && numberSelectHistory > 0) {
console.log('numberSelectHistory: ', numberSelectHistory);
setNumberSelectHistory(
numberSelectHistory !== 'zero' ? numberSelectHistory - 1 : 0 - 1,
);
......@@ -115,7 +112,8 @@ const ModalPhoneNumpad = ({
setNumberSelectHistory('zero');
}
if (selectedNumber) {
setInputValue(selectedNumber);
console.log('setInputValue: ', setInputValue);
// setInputValue(selectedNumber);
}
}
}, [numberSelectHistory]);
......
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