亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - [React Native] How to maintain the scroll bar of each ListView within Tabs?
伊謝爾倫
伊謝爾倫 2017-06-26 10:58:55
0
1
1178

The problem has been solved, it is a css style problem. . . . It has nothing to do with js. . .

I included a listview in the tabs,
but when switching tabs, the scroll bars of the listview are all at the same position. . .
That is to say, I scrolled 100px in the first tabs, and switched to the second tabs, which is also at the 100px position. .
componentDidMount It will only be triggered once...
How to ensure that the scroll bar of each listview is in its respective position. .

//數(shù)組保存8個(gè)
  const genTabpaneComp = (count) => {
    const result = [];
    for (let i = 0; i <= count; i++) {
      result.push(TabpaneComp(i));
    }
    return result;
  };

  //Tabpane 內(nèi)容
  const TabpaneComp = (key) => {
    let props;
    return(
      <TabPane tab={Tabp(key)} key={ key }>
        <p className={styles.categoryList}>
          <ContentView {...props}/>
        </p>
      </TabPane>
    )
  };

The result is as shown:

伊謝爾倫
伊謝爾倫

小伙看你根骨奇佳,潛力無(wú)限,來(lái)學(xué)PHP伐。

reply all(1)
Peter_Zhu

You can remember the scroll position of the previous tabPane when switching tabs, so that the scroll position without tabPane can be maintained.
read https://github.com/ant-design...

There is another way to make the height of styles.categoryList fixed.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template