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 working with children #35

Closed
dangreen opened this issue Mar 12, 2019 · 3 comments
Closed

Fix working with children #35

dangreen opened this issue Mar 12, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@dangreen
Copy link
Member

  1. Filter with child && (...) instead .filter(Boolean)
  2. Use Children.map, no any Children.toArray(...).filter(...).map(...) and etc.

Working branch: children-map-mod

@dangreen dangreen added the enhancement New feature or request label Mar 12, 2019
@Rustamhabibullin
Copy link
Contributor

Rustamhabibullin commented Mar 12, 2019

@dangreen не совсем понял что именно делать, т.е я в проекте weather должен найти везде где используется .filter(Boolean) Children.toArray(...).filter(...).map(...) и переделать примерно так же как это было в компоненте Navigator?

В компоненте TodoList есть конструкция

{Children
					.toArray(children)
					.filter(Boolean)
					.map((child: ReactElement<any>) => cloneElement(child, {
						onSubmit: this.onChange,
						onDelete: this.onDelete
					}))
				} 

ее нужно переделать?

@dangreen
Copy link
Member Author

@Rustamhabibullin

и переделать примерно так же как это было в компоненте Navigator

да

@dangreen
Copy link
Member Author

Done in #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants