Cannot remove ion-activatable class from an ion-item

Hi everyone, I am using ionic 6 with angular. I have been trying to remove the ion-activatable class from an ion-item. I have tried getting the ElementRef of the ion-item and using “ionItemElementRef.nativeElement.classList.remove(“ion-activatable”)”. It doesn’t work. Similarly,
“ionItemElementRef.nativeElement.classList.contains(“ion-activatable”)” returns FALSE.
Whats interesting is that the output to the console of the classList is:

  1. DOMTokenList [value: ‘’]

  2. 0: “item-interactive”

  3. 1: “item-select”

  4. 2: “item-has-placeholder”

  5. 3: “ion-color”

  6. 4: “ion-color-gainsboro”

  7. 5: “item”

  8. 6: “md”

  9. 7: “item-lines-none”

  10. 8: “item-fill-none”

  11. 9: “ion-activatable”

  12. 10: “ion-focusable”

  13. 11: “hydrated”

  14. length: 12

  15. value: “item-interactive item-select item-has-placeholder ion-color ion-color-gainsboro item md item-lines-none item-fill-none ion-activatable ion-focusable hydrated”

so the class clearly exists yet classList methods do nothing to it.

Then I tried using [ngClass]="{‘ion-activatable’:false}" in the ion-item in the html template. That doesn’t work either.

Finally, I tried [class.ion-activatable]=“false” in the ion-item in the html template, which also doesn’t work.

My question is , in general, how do you remove or add a class to an ionic component at runtime?

Thanks for your help everyone.