You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(JSX attribute) onPageSelected: (e: any) => void
No overload matches this call.
Overload 1 of 2, '(props: Readonly): IndicatorViewPager', gave the following error.
Type '{ children: Element[]; style: { height: number; }; indicator: Element; onPageSelected: (e: any) => void; ref: (viewPager: IndicatorViewPager | null) => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.
Property 'onPageSelected' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.
Overload 2 of 2, '(props: IndicatorViewPagerProps, context?: any): IndicatorViewPager', gave the following error.
Type '{ children: Element[]; style: { height: number; }; indicator: Element; onPageSelected: (e: any) => void; ref: (viewPager: IndicatorViewPager | null) => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.
Property 'onPageSelected' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.ts(2769)
Do anyone has any fix fo this?
The text was updated successfully, but these errors were encountered:
I am trying to use the rn-viewpager.
But getting a warning on using OnPageSelected Inside <IndicatorViewPager
Code is something like this
<IndicatorViewPager
//Something herestyle={{ height: height - (Platform.OS === 'android' ? 50 : 80) }}
indicator={this.renderDotIndicator()}
onPageSelected={this.getSelectedPage}
ref={viewPager => {
this.viewPager = viewPager;
}}>
Warning appears something like this.
(JSX attribute) onPageSelected: (e: any) => void
No overload matches this call.
Overload 1 of 2, '(props: Readonly): IndicatorViewPager', gave the following error.
Type '{ children: Element[]; style: { height: number; }; indicator: Element; onPageSelected: (e: any) => void; ref: (viewPager: IndicatorViewPager | null) => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.
Property 'onPageSelected' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.
Overload 2 of 2, '(props: IndicatorViewPagerProps, context?: any): IndicatorViewPager', gave the following error.
Type '{ children: Element[]; style: { height: number; }; indicator: Element; onPageSelected: (e: any) => void; ref: (viewPager: IndicatorViewPager | null) => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.
Property 'onPageSelected' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.ts(2769)
Do anyone has any fix fo this?
The text was updated successfully, but these errors were encountered: