Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal unknown properties in Button from actions array #1813

Closed
TroySchmidt opened this issue Jun 29, 2017 · 1 comment
Closed

Modal unknown properties in Button from actions array #1813

TroySchmidt opened this issue Jun 29, 2017 · 1 comment

Comments

@TroySchmidt
Copy link

Steps

<Modal basic
dimmer='blurring'
trigger={}
header='Delete Route Batch?'
content={Are you sure you want to delete ${props.routeBatch.description}}
actions={[
{ key: 'no', content: 'No', color: 'red', triggerClose: true },
{ key: 'yes', content: 'Yes', color: 'green', triggerClose: true, onClick:() => props.deleteRouteBatch(props.routeBatch.routeBatchId) },
]}
/>

Expected Result

Works but with warning

Actual Result

Warning about unknown props on Button coming from the actions. It works as expected. Now if I change onClick to onActionClick it complains about that property as well. So it isn't peeling off enough of the properties when it is passing it along to create.

I am using Redux so adding a bunch of properties to the state tree to manage a whole bunch of modal dialogs open state with a property isn't really an efficient / clean solution. So I like tapping into the triggerClose property but would like for the React 0.15.2 warnings about unknown properties to stop.

Version

0.70.0

@layershifter
Copy link
Member

Duplicate, #1642.

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

No branches or pull requests

2 participants