Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript Scroll into a div that is hidden initially in react

import {Picker} from "emoji-mart";
const pickerRef = useRef()
const[showEmojis,setShowEmojis]=useState(false);

useEffect(() => {
 
   pickerRef.current.scrollIntoView(true)
  
} , [showEmojis])


return(
<>
   <EmoticonContainer >
        <Picker id="picker" style={{width: '100%'}} onSelect={addEmoji}/>
    </EmoticonContainer>
    <div ref={emojiRef}></div>
</>
)

const EmoticonContainer=styled.div`
display:flex;
flex-direction:column;
`;
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to setup a webpack quickly 
Javascript :: How to get access to the PromiseResult in React when calling Azure Cosmos DB api 
Javascript :: dependent drop down list in jquery 
Javascript :: Cannot redefine property: clientWidth 
Javascript :: count object based on status and shop using javascript 
Javascript :: Make a card dynamic with Angular JS 
Javascript :: angularjs No alignment and missing item in a vertical menu 
Javascript :: angularjs How to get time difference from ZoneDateTime in javascript 
Javascript :: How to call keyup function on textbox for every dynamic generated form in Angular8 
Javascript :: How can I save a option from multi select in Angular 
Javascript :: inserting new value to an array of object in typescript 
Javascript :: Why is <CalendarStrip / not working properly 
Javascript :: sfc setup vue 3 mounted method - lifecycle methods in sfc 
Javascript :: Save multiple radios checked on LocalStorage 
Javascript :: I have a dataframe with a json substring in 1 of the columns. i want to extract variables and make columns for them 
Javascript :: string split into three non empty combination js 
Javascript :: ant design rtl 
Javascript :: Sequelize conditional shorthands 
Javascript :: Printer Errors 
Javascript :: get value from createReadStream 
Javascript :: angular error handling 
Javascript :: javascript code to decide even or odd number in html using visual studio 
Javascript :: ip scanner node 
Javascript :: js get first elements of array 
Javascript :: Calculate sum of last column in dynamically added rows using javascript 
Javascript :: es6 javascript return types 
Javascript :: todo app html css javascript 
Javascript :: var logEvenNums = function(num) {}; 
Javascript :: Prevent HTTP Parameter Polution in NodeJS 
Javascript :: document.getelementbyid add number 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =