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
I want to call a specific component on the currently displayed slide.
so Im using state to determine which slide is currently being shown.
but the state.section.index coming in the afterSlideLoad event doesn't seem to represent the index of the current section
Link to isolated reproduction with no external CSS / JS
[Ideally in codesandbox.io, links to personal websites won't be reviewed unless isolated. Reported issues without a reproduction might get closed.]
Steps to reproduce it
1.here is part of the code
<ReactFullpagepluginWrapper={pluginWrapper}interlockedSlides={true}css3={false}navigationscrollOverflow={true}afterLoad={afterLoad}afterSlideLoad={afterSlideLoad}render={({state, fullpageApi})=>{console.error("------ FullPage Render!! : ",{state, fullpageApi})const{initialized, direction, lastEvent, section}=stateconstindex=state?.destination?.indexconsole.error("----state.destination.index ? ",index)console.error("section.index? ",section?.index)constisSectionLoaded=lastEvent==='afterLoad'constisSlideLoaded=lastEvent==='afterSlideLoad'constisLightMode=direction==='left'constisShadowMode=direction==='right'return(<divid="fullpage-wrapper"><divclassName="section active"id="section1"><videoid="myVideo"loopmuteddata-autoplay><sourcesrc="flowers.mp4"type="video/mp4"/><sourcesrc="flowers.webm"type="video/webm"/></video><divclassName="layer"><h1>blah----</h1></div></div><divclassName="section"id="section2"><divclassName="slide"><h2>Feature1 - light</h2><h2style={style}>menu1 - test gltf load and animation version4 </h2><buttononClick={()=>fullpageApi.moveSlideRight()}>go to Shadow side
</button><div>{(index==1&&isSectionLoaded)||(isSlideLoaded&&isLightMode&§ion.index===1) ? <Character4index={index}/> : null}</div></div><divclassName="slide dark"><h2>Feature1 - dark</h2><buttononClick={()=>fullpageApi.moveSlideLeft()}>go to Light side
</button><div>{(index==1&&isSectionLoaded)||(isSlideLoaded&&isShadowMode&§ion.index===1) ? ()=>{console.error("feature1 dark");returnnull} : null}</div></div></div>
console log capture - when I switched slide on section2
I thought section.index supposed to be index 1 which means section2
Versions
"@fullpage/react-fullpage": "^0.1.19", -> it uses fullpage v3.1
and I run on chrome browser
The text was updated successfully, but these errors were encountered:
Description
I want to call a specific component on the currently displayed slide.
so Im using state to determine which slide is currently being shown.
but the state.section.index coming in the afterSlideLoad event doesn't seem to represent the index of the current section
Link to isolated reproduction with no external CSS / JS
[Ideally in codesandbox.io, links to personal websites won't be reviewed unless isolated. Reported issues without a reproduction might get closed.]
Steps to reproduce it
1.here is part of the code
I thought section.index supposed to be index 1 which means section2
Versions
"@fullpage/react-fullpage": "^0.1.19", -> it uses fullpage v3.1
and I run on chrome browser
The text was updated successfully, but these errors were encountered: