Commit 6867ede9 authored by Muhammadali's avatar Muhammadali

update-

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