React-native-collapsible: Misbehaviour while showing dynamic content in the collapsible

Created on 15 Aug 2017  路  13Comments  路  Source: oblador/react-native-collapsible

Hi,

i'm searching for a way, to do collapsibles the right thing!

Heres my example:
Dynamic content in collapsible

Heres my problem:
I would like to display some dynamic content in the collapsible. In this example, there will be some times displayed. Don't worry about the same times. I only would like to show some dynamic content.
First of all, the collapse property is set to false in the initial state of redux, but the collapsible is closed (collapsible=true?!?!).
The second misbehaviour is, when the collapsible is shown (collapse=false) and a timeout is set. Then the collapsible closes itself.

What am i doing wrong???

I would like to display some times in the collapsible, without having this misbehaviour of closing the collapsible itself.

Any suggestions?

help wanted fixed-next-release

Most helpful comment

Having the same issue. When i update a collapsible that is open, it renders nothing even if the collapsed props is at false.

All 13 comments

Hey @ralcon could you be a bit clearer? I'm not sure what you're asking exactly

Hi, i got the following problem:
My aim is to display several country times, updated by redux (every second via timeout), see my example. When i open the collapsible the first time, everything works fine and is displayed how it should be. but when i activate the timeout to render the information, the collapsible callapses itself. the variable to identify, if the collapsible is collapsed, is false all the time (a redux property). why is the collapsible collapse itself?
A little bit clearer?

The target state should be:

  • Open callaspsibles
  • Press "Start" button
  • New times are rendered every second

=> Collapsibles should stay 'open' (collapse={false})!

_within the given example:_
_1. git clone https://github.com/ralcon/dynamic-content-in-collapsible_
_2. cd dynamic-content-in-collapsible_
_3. npm install_
_4. react-native run-ios_

@iRoachie : I am too facing the issue while showing dynamic controls in collapsible. Please see the video - https://hub.mangoapps.com/sf/MTAyNzA3XzEzODIxNzA

Having the same issue. When i update a collapsible that is open, it renders nothing even if the collapsed props is at false.

Just merged #147. Release will be out in a few mins.

Released in v0.11.0

Hello!
this bug is present in current version, pr #147 not merged

@dansanti I am still seeing issues when children inside Collapsible re-render. Did you manage to fix it?

PR #147 fix it, you have to manually apply the patch

@dansanti It introduced flickering when my content changes height. Does that happen to you too?

Was this page helpful?
0 / 5 - 0 ratings