react-native-expandable-section-list icon indicating copy to clipboard operation
react-native-expandable-section-list copied to clipboard

How to collapse a section programatically ?

Open QuanQuach opened this issue 7 years ago • 2 comments
trafficstars

Hi cuiyueshuai, I would like to close a section programatically when another section is expandable. how could i do that?

QuanQuach avatar Apr 09 '18 13:04 QuanQuach

@QuanQuach , oh, sorry, The react-native-expandable-section-listcurrently does not support this requirement, through other ways to actively close a group, can only click on the group header to close the group, But I will support the feat in the next version, defines a function that closes or opens a grouping, You need to wait for me for a few days, I'm so sorry.

cuiyueshuai avatar Apr 10 '18 03:04 cuiyueshuai

@QuanQuach , I've updated react-native-expandable-section-list to 1.0.6, This should be able to meet your needs   The function of setSectionState can change the section's state, The first parameter is index of section, The second parameter is used to set the state of the corresponding section, true is open, false is close  

cuiyueshuai avatar Apr 11 '18 13:04 cuiyueshuai