Skip to content

Pubsub between parent and child component #326

Description

@yapcheahshen

Assume that:
aura_components/mainview_widget // a tabs interface
aura_components/tab_widget
aura_components/A_widget
aura_components/B_imp1_widget
aura_components/B_imp2_widget

mainview_widget has children A_widget and multiple instances of tab_widget
tab_widget has children A and B ( either B_imp1_widget or B_imp2_widget)

My questions:

  1. How could A_widget get it's parent view object without knowing the component name? is there a cleaner way than "use jQuery parent() recursively and look for div with data-aura-widget attribute, get the backbone view object from the doc node "
  2. How could tab_widget notify only child components via emit/on without knowing component name?
  3. How could tab_widget notify a certain type of children regardless of the implementation name, e.g, notifying "B" instead of B_imp1, B_imp2 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions