Skip to content

fix(appbar): make allowed children to accept additional props#1001

Merged
jayu merged 1 commit intocallstack:masterfrom
brunohkbx:fix/appbar
Apr 17, 2019
Merged

fix(appbar): make allowed children to accept additional props#1001
jayu merged 1 commit intocallstack:masterfrom
brunohkbx:fix/appbar

Conversation

@brunohkbx
Copy link
Copy Markdown
Collaborator

Comparing a string to child.type.name doesn't work when the component is wrapped by withTheme. So we need to check against its type.

Motivation

#972

Before:
WhatsApp Image 2019-04-17 at 10 48 54 (1)

Fixed:
WhatsApp Image 2019-04-17 at 10 48 54

@callstack-bot
Copy link
Copy Markdown

Hey @brunohkbx, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@brunohkbx
Copy link
Copy Markdown
Collaborator Author

brunohkbx commented Apr 17, 2019

@jaysbytes I should have tested in the example app our last changes, my bad. What do you think?

@jayu jayu merged commit 57a9e97 into callstack:master Apr 17, 2019
@brunohkbx brunohkbx deleted the fix/appbar branch April 17, 2019 15:16
jbinda pushed a commit to jbinda/react-native-paper that referenced this pull request Apr 17, 2019
@awinograd
Copy link
Copy Markdown

awinograd commented Jun 3, 2019

I just upgraded from 2.15.2 to 2.16.0 to get the fix for Searchbar nested inside Appbar. I now see this bug (text is black), but only in development. In production, the type check works properly and the colors are as expected (white).

please ignore this for now, sorry! i thought I updated some code but hadn't so this may not be up to date

Update: This does appear to be the case. When I compile with NODE_ENV === production, the text is white and things are fine. In development, the type matching doesn't work as expected. Shall I file a separate issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants