Skip to content

[Step] Use $parent.steps property instead of $parent.$children#18758

Open
Tofandel wants to merge 1 commit intoElemeFE:devfrom
Tofandel:patch-5
Open

[Step] Use $parent.steps property instead of $parent.$children#18758
Tofandel wants to merge 1 commit intoElemeFE:devfrom
Tofandel:patch-5

Conversation

@Tofandel
Copy link
Copy Markdown

When using el-steps with elements other than el-step (To display content when vertical for instance)

When the step is changed, an error is thrown (TypeError: prevChild.calcProgress is not a function) because the element is using the $children property of the $parent (Refering to the el-step components and also the content elements that are not el-step and thus messing up the index of the $children property)

The el-step element is already adding a property steps to it's parent and this property should be used instead of $children

This fixes the previously described bug

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@Tofandel Tofandel changed the title [Step] Use steps $parent property instead of $children [Step] Use $parent.steps property instead of $parent.$children Jan 27, 2020
@element-bot
Copy link
Copy Markdown
Member

Deploy preview for element ready!

Built with commit 1d301b0

https://deploy-preview-18758--element.netlify.com

@stale
Copy link
Copy Markdown

stale bot commented Jun 18, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 18, 2021
@Tofandel
Copy link
Copy Markdown
Author

Bump

@stale stale bot removed the stale label Jun 19, 2021
@Tofandel
Copy link
Copy Markdown
Author

Tofandel commented Sep 8, 2021

@cs1707 Can you have a look please?

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.

2 participants