ios - React Native ListView with fixed section header that can be updated -


i made section header in listview responds state changes realised need fixed. upon changing renderheader rendersectionheader fixed no longer responds state changes.

    <listview       datasource={this.state.datasource}       renderheader={this.renderheader}       renderrow={this._renderrow}     />  renderheader: function() { return (   <view>     <text>{this.state.header}</text>   </view> 

in way if state changed, text (or whatever is) update accordingly. when scrolling list header not fixed.

    <listview       datasource={this.state.datasource}       rendersectionheader={this.rendersectionheader}       renderrow={this._renderrow}     />  rendersectionheader: function() { return (   <view>     <text>{this.state.header}</text>   </view> 

with code above however, section header fixed in place when scrolling when making alterations state strangely not update in section header ordinary header.

if use rendersectionheader render header, need use clonewithrowsandsections opposed clonewithrows.

here pretty discussion on how implement depending on data.

here implementation of clonewithrowsandsections on github.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -