Commit 79990d65 authored by Muhammadali's avatar Muhammadali

update-

parent c75d6f08
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "2.8.7", "version": "2.8.8",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -12,11 +12,11 @@ const CallHistoryInputDropdown = ({ ...@@ -12,11 +12,11 @@ const CallHistoryInputDropdown = ({
}) => { }) => {
const [modal, setModal] = useState(false); const [modal, setModal] = useState(false);
var elem = document.getElementById('data'); var elem = document.getElementById('data');
useEffect(() => { // useEffect(() => {
if (call_history.length) { // if (call_history.length) {
elem.scrollTop = elem.scrollHeight; // elem.scrollTop = elem.scrollHeight;
} // }
}, []); // }, []);
const selectFuncInset = (e) => { const selectFuncInset = (e) => {
selectFunc(e); selectFunc(e);
setModal(false); setModal(false);
...@@ -24,6 +24,9 @@ const CallHistoryInputDropdown = ({ ...@@ -24,6 +24,9 @@ const CallHistoryInputDropdown = ({
useEffect(() => { useEffect(() => {
if (call_history.length) { if (call_history.length) {
if (numberSelectHistory == 0) {
return (elem.scrollTop = elem.scrollHeight);
}
elem.scrollTop = elem.scrollHeight - numberSelectHistory * 50; elem.scrollTop = elem.scrollHeight - numberSelectHistory * 50;
} }
}, [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