I just implemented scrollIntoView to scroll to an element when an event occurs , it works well in web browsers but while testing it in ios simulator it throws this error , is there any replacement for scrollIntoView on react-native or I am doing something wrong ?
error:
TypeError: inputRefs[propertyName].scrollIntoView is not a function. (In 'inputRefs[propertyName].scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'start'
})', 'inputRefs[propertyName].scrollIntoView' is undefined)
Here is what i am using, this works fine on web
inputRefs[propertyName]?.scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'start',
});