8000 fix(TimedToastNotification): Stop passing down all props by sharvit · Pull Request #139 · patternfly/patternfly-react · GitHub
[go: up one dir, main page]

Skip to content

fix(TimedToastNotification): Stop passing down all props#139

Merged
jeff-phillips-18 merged 1 commit intopatternfly:masterfrom
sharvit:fix/toast-props
Dec 20, 2017
Merged

fix(TimedToastNotification): Stop passing down all props#139
jeff-phillips-18 merged 1 commit intopatternfly:masterfrom
sharvit:fix/toast-props

Conversation

@sharvit
Copy link
Contributor
@sharvit sharvit commented Dec 20, 2017

What:
Fix an issue when using the TimedToastNotification

Link to Storybook

When I tried to use the TimedToastNotification i received this error:

VM4358 preview.bundle.js:69198 Warning: Received `false` for a non-boolean attribute `paused`.

If you want to write it to the DOM, pass a string instead: paused="false" or paused={value.toString()}.

If you used to conditionally omit it with paused={condition && value}, pass paused={condition ? value : undefined} instead.
    in div (created by ToastNotification)
    in ToastNotification (created by TimedToastNotification)
    in TimedToastNotification (created by Toast)
    in Toast

It is happening because the prop paused is pass down into a div.

@priley86
Copy link
Member
priley86 commented Dec 20, 2017

@sharvit alternative is to just destructure paused and timerdelay in ToastNotification, but this works as well. What if you want to add additional props though? I think destructure may be more flexible..

this works though...

@jeff-phillips-18 jeff-phillips-18 merged commit 7ebba79 into patternfly:master Dec 20, 2017
@sharvit sharvit deleted the fix/toast-props branch December 20, 2017 19:40
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.

3 participants

0