aksonov / react-native-tabs

React Native platform-independent tabs. Could be used for bottom tab bars as well as sectioned views (with tab buttons)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example doesn't work

dangnelson opened this issue · comments

I copy and pasted your example, but the tabs don't all appear, only the "First" tab appears bottom and center.

you're right! taking a look at this now

@aksonov looks like the example hasn't had the package.json updated to the latest version. It also seems like there is an issue with not having unique keys, however even when I fix that there is a rendering issue on the tabs. I can dig into this more next time I set aside more time for this project

I think I found the issue here. I'll send a PR if it works out.

I ve solved issue with keys but now it doesn't select tab with red color

Pavel.

22 дек. 2015 г., в 01:07, Ken Thompson notifications@github.com написал(а):

I think I found the issue here. I'll send a PR


Reply to this email directly or view it on GitHub.

Changing

{!self.props.selected && (self.state.selected == el.props.name) ? React.cloneElement(el, self.state.props) : el}

To

{self.props.selected && (self.state.selected == el.props.name) ? React.cloneElement(el, self.state.props) : el}

Fixed it for me. I'd be lying if I said I fully understood what that !self.props.selected && was for

That was for an issue where the react native tab was overriding the selected prop with its internal state prop

Fixes an issue with the integration with react native flux router but @askonov there might be a better way than how I've done it

Should be fixed, please check latest version