Skip to content

bug: ion-item-sliding reads option side before frameworks assign it, start options broken or open from the wrong side (v9 React) #31388

Description

@aeharding

Prerequisites

Ionic Framework Version

v9.x

Current Behavior

side="start" options can't be swiped open, or open on the wrong side. Only happens when the item doesn't contain an IonLabel.

Expected Behavior

side="start" options open on start swipe regardless of item content.

Steps to Reproduce

Open repo (stock example with IonLabel changed to <p>, try sliding:

Docs example item With IonLabel With p instead
End options only
Start options only ❌ opens on end swipe instead of start
Options on both sides ❌ start options never open

Code Reproduction URL

https://stackblitz.com/edit/saccabqc-rxbbctar

Ionic Info

v9.0.0

Additional Information

Repro: the docs React example with each IonLabel swapped for a p. Reproduces on 9.0.0 and 9.0.1-dev.11787177893.1979eb13, React 18 and 19. Worked in 8.8.19.

Same cause as #31377: sides are read in connectedCallback before React assigns side, so both options register as end. IonLabel masks it by mutating its light DOM after mount, which happens to re-trigger updateOptions after props arrive; any other content and the wrong sides are permanent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: buga confirmed bug report

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions