Skip to content

ActionBarExtension throws when adding/removing new items dynamically #978

Closed
@sis0k0

Description

@sis0k0

When there's no explicit ActionBar directive defined in the Page, the default one doesn't have meta information (insertChild, removeChild methods) attached to it.
Let's say we create an ActionBarExtension with an ActionItem in that Page.

<ActionBarExtension>
    <ActionItem (tap)="show = !show" text="toggle">
    </ActionItem>

    <ActionItem *ngIf="show" text="conditional">
    </ActionItem>
</ActionBarExtension>

If we remove the ActionItem dynamically, the renderer will call the generic _removeView (that's because the default ActionBar doesn't have meta, as mentioned above). This results in the following error:

JS: ERROR Error: View not added to this instance. View: [object Object] CurrentParent: undefined ExpectedParent: ActionBar(3)

related to #942
thanks to @madakk for reporting

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions