Skip to content

vnode props can't be accessed from parent #1186

Closed
@lzhoucs

Description

@lzhoucs

Version

3.0.0-beta.12

Reproduction link(either one of the following)

Steps to reproduce

  • Go to one of the reproduction links above(neither works as expected)
  • Click on one of the two tabs
  • Check console log

What is expected?

true/false is logged

What is actually happening?

undefined is logged


I need to access Tab's active prop inside Tabs, I found no way to do it. This ticket is similar to #1082. The only difference is this ticket has issue getting child vnode props from parent whereas #1082 had issue setting it.

In both reproduction links, the console.log(vnode.props.active) shows undefined when either tab is clicked, even though vnode.props.active can be set properly from parent now that #1082 is fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions