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

fix warning on dialog #2372

Merged
merged 1 commit into from Dec 5, 2015
Merged

fix warning on dialog #2372

merged 1 commit into from Dec 5, 2015

Conversation

chrismcv
Copy link
Contributor

@chrismcv chrismcv commented Dec 4, 2015

No description provided.

@oliviertassinari
Copy link
Member

This is breaking one test. What's is your warning?

@chrismcv
Copy link
Contributor Author

chrismcv commented Dec 4, 2015

missing key on actionObjects

@chrismcv
Copy link
Contributor Author

chrismcv commented Dec 4, 2015

argh - typo - fixed React.Children not React.children

@oliviertassinari
Copy link
Member

React.Children.toArray
Return the children opaque data structure as a flat array with keys assigned to each child. Useful if you want to manipulate collections of children in your render methods, especially if you want to reorder or slice this.props.children before passing it down.

If we follow this page, I think that we can remove the key affectation from _getAction().
Another way to do is by adding key to ValidElement with cloneElement

What's best?

@chrismcv
Copy link
Contributor Author

chrismcv commented Dec 4, 2015

I think removing the key is cleanest

@oliviertassinari
Copy link
Member

I'm ok with this. Could you squash down the commits?
I will merge, unless @subjectix has any feedbacks, thanks!

@chrismcv
Copy link
Contributor Author

chrismcv commented Dec 4, 2015

@oliviertassinari squished

@alitaheri
Copy link
Member

@oliviertassinari Actually, I believe all usage of JSON must be replaced with composing. But that's for later on. For now this is good. Nice work @chrismcv 👍

oliviertassinari added a commit that referenced this pull request Dec 5, 2015
[Dialog] Fix key warnings when not using json action
@oliviertassinari oliviertassinari merged commit 615a6b8 into mui:master Dec 5, 2015
@oliviertassinari
Copy link
Member

@chrismcv Thanks

@chrismcv chrismcv deleted the dialog-fix branch February 1, 2016 21:12
@zannager zannager added the component: dialog This is the name of the generic UI component, not the React module! label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dialog This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants