rollymaduk / react-native-collapsible-tab-header

"Group of react-native components to ease implementation of collapsible headers with tabs"
20 stars 9 forks source link

Can't set fixed height of collapsible header #3

Closed Belobobr closed 6 years ago

Belobobr commented 6 years ago

It seems that Collapsible: height(number | string)-default('30%') must someway handle fixed height. But currently it does't.

I make this hot fix in getHeight function:

if (typeof(height) === 'string' && !height.contains('%')) { return parseFloat(height); }

rollymaduk commented 6 years ago

@Belobobr that's strange, because the function parseFloat('30') === parseFloat('30%') returns true, parseFloat('30') === parseFloat(30) also returns true, so I am not sure that the problem precipates from that issue in the getHeight function. perhaps if you can do an example repo with the problem you encountered we can get to the real cause of the bug. You can also look up the tests to verify the logic