Commit a997d833 authored by Muhammadali's avatar Muhammadali

update-

parent 32cd7779
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "2.7.8", "version": "2.7.9",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -8,13 +8,14 @@ const CallHistoryInputDropdown = ({ ...@@ -8,13 +8,14 @@ const CallHistoryInputDropdown = ({
call_history, call_history,
selectFunc, selectFunc,
numberSelectHistory, numberSelectHistory,
setDefaultHistoryNumberHistory,
}) => { }) => {
const [modal, setModal] = useState(false); const [modal, setModal] = useState(false);
useEffect(() => { useEffect(() => {
if (call_history.length) { if (call_history.length) {
var elem = document.getElementById('data'); var elem = document.getElementById('data');
elem.scrollTop = elem.scrollHeight; elem.scrollTop = elem.scrollHeight - numberSelectHistory * 34;
} }
}, [call_history]); }, [call_history]);
const selectFuncInset = (e) => { const selectFuncInset = (e) => {
...@@ -22,12 +23,18 @@ const CallHistoryInputDropdown = ({ ...@@ -22,12 +23,18 @@ const CallHistoryInputDropdown = ({
setModal(false); setModal(false);
}; };
useEffect(() => {}, [inputValue]); useEffect(() => {
var elem = document.getElementById('data');
elem.scrollTop = elem.scrollHeight - numberSelectHistory * 34;
}, [inputValue]);
return ( return (
<Block> <Block>
<Input <Input
onClick={() => setModal(!modal)} onClick={() => {
setDefaultHistoryNumberHistory();
setModal(!modal);
}}
className='nocopy' className='nocopy'
type='text' type='text'
value={inputValue}> value={inputValue}>
......
...@@ -102,7 +102,7 @@ ModalDropDown.Inset = styled.div` ...@@ -102,7 +102,7 @@ ModalDropDown.Inset = styled.div`
ModalDropDown.Item = styled.p` ModalDropDown.Item = styled.p`
font-size: 18px; font-size: 18px;
transition: 0.2s; transition: 0.2s;
padding: 5px 2px; padding: 5px 12px;
margin: 3px 0; margin: 3px 0;
border-radius: 10px; border-radius: 10px;
:hover { :hover {
......
...@@ -197,6 +197,9 @@ const ModalPhoneNumpad = ({ ...@@ -197,6 +197,9 @@ const ModalPhoneNumpad = ({
const selectFunc = (e) => { const selectFunc = (e) => {
setInputValue(e); setInputValue(e);
}; };
const setDefaultHistoryNumberHistory = () => {
setNumberSelectHistory('zero');
};
console.log('numberSelectHistory: ', numberSelectHistory); console.log('numberSelectHistory: ', numberSelectHistory);
...@@ -212,6 +215,7 @@ const ModalPhoneNumpad = ({ ...@@ -212,6 +215,7 @@ const ModalPhoneNumpad = ({
inputValue={inputValue} inputValue={inputValue}
selectFunc={selectFunc} selectFunc={selectFunc}
numberSelectHistory={numberSelectHistory} numberSelectHistory={numberSelectHistory}
setDefaultHistoryNumberHistory={setDefaultHistoryNumberHistory}
/> />
{inputValue.length ? ( {inputValue.length ? (
<Input.BackSpaceIcon <Input.BackSpaceIcon
......
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