Closed jongbonga closed 1 year ago
Thanks for the report. The problem here is the start ion-item-options
has an *ngIf
which causes the component to be added after the end ion-item-options
component is added to the DOM.
While we do watch for new instances of ion-item-option
, this listener is added too late: https://github.com/ionic-team/ionic-framework/blob/0c117cfe7f383b7c7837d27de5a6eee12ddd6c2f/core/src/components/item-sliding/item-sliding.tsx#L79-L83
When await this.updateOptions
is called, the start component has not been added to the DOM. This function is asynchronous, so by the time the function returns and the MutationObserver is setup the start component has already been added to the DOM, so we missed it.
Here is a dev build with a proposed fix if you are interested in testing:
npm install @ionic/angular@7.2.2-dev.11690983626.19a2a8cb
Here is a dev build with a proposed fix if you are interested in testing:
npm install @ionic/angular@7.2.2-dev.11690983626.19a2a8cb
Thank you
@liamdebeasi looks like it did the trick, working fine. Thank you
Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic-framework/pull/27915, and a fix will be available in an upcoming release of Ionic Framework.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
In a list of multiple ion-item-slidings, when an
ion-item-sliding
with conditioned options is revealed, the item does not slide on the conditioned option side.Expected Behavior
The options should be able to respect the conditions when there is more than one ion-item-sliding in a list
Steps to Reproduce
ion-item-sliding
with optionsCode Reproduction URL
https://github.com/jongbonga/ion-item-sliding-issue
Ionic Info
Additional Information
I'm on the latest ionic v7.2.1