Ionic unselect tab after second click

Good day.
I trying set active tab inactive after second click, but ionSelect not firing for current tab item.
Is there any way to do it?

This sounds like a bad UI to me. How can you have a tab that is simultaneously active and inactive?

See if one of the many things in here would solve your problem: Click event for ion-tab?

Yes, its bad UI, but it in need by design

Same problem for me : root = null; doesn’t work

I wrote the following on StencilJS but I must admit I don’t like it very much since it was necessary to declare data-tab as a custom attribute on <ion-tab /> and on its corresponding <ion-tab-button />.

  <ion-tab data-tab="tab-something" tab="tab-something" >

    <ion-tab-button data-tab="tab-something" tab="tab-something" onClick={() => this.toggleTab('tab-something')}>
      <ion-icon name="list-outline"></ion-icon>
  toggleTab(datatab: string): void {
    const ionTabButton = this.el.querySelector(`ion-tab-button[data-tab="${datatab}"]`) as HTMLIonTabButtonElement;
    ionTabButton.selected = !ionTabButton.selected;
    const ionTab = this.el.querySelector(`ion-tab[data-tab="${datatab}"]`) as HTMLIonTabElement; = !;