Skip to content

Allow ion-tab-button with undefined "tab" property to do nothing. #102

Closed
@mattsteve

Description

@mattsteve

Right now if you don't specify the "tab" property on an ion-tab-button it defaults to "/" in @modus/ionic-vue, whereas the original component in @ionic/core simply does nothing.

This "doing nothing" behavior is required for adding a custom click event handler to tab buttons that doesn't involve redirecting the page. When using this library it's impossible to make an ion-tab-button do something custom like open a modal instead of route to a page.

My suggestion is here:
https://github.com/ModusCreateOrg/ionic-vue/blob/master/src/components/navigation/ion-tabs.ts#L137

If (child.elm as HTMLIonTabButtonElement).tab doesn't exist, simply return; do nothing.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions