Commit f3d7bc3c authored by Muhammadali's avatar Muhammadali

update-

parent 6867ede9
{
"name": "boxdialer",
"version": "3.0.0",
"version": "3.0.1",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -10,31 +10,31 @@ 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);
// };
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(() => {
if (call_history.length) {
if (numberSelectHistory == 0 || numberSelectHistory == 'zero') {
elem.scrollTop = elem.scrollHeight;
} else {
elem.scrollTop = elem.scrollHeight - numberSelectHistory * 50;
}
}
}, [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>
......
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