Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ion-item-sliding auto close #29504

Open
3 tasks done
q962 opened this issue May 15, 2024 · 2 comments
Open
3 tasks done

feat: ion-item-sliding auto close #29504

q962 opened this issue May 15, 2024 · 2 comments
Assignees
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author

Comments

@q962
Copy link

q962 commented May 15, 2024

Prerequisites

Describe the Feature Request

auto close sliding

Describe the Use Case

When the user swipes an item, it will remain open unless manually closed.

Ideal logic: automatically close when the current item loses focus

Describe Preferred Solution

No response

Describe Alternatives

No response

Related Code

No response

Additional Information

The most convenient way

window.addEventListener("click", (el) => {
  let parent: HTMLElement | any = el.target;

  while (parent) {
    if (parent == list.value.$el) {
      return;
    }

    parent = parent.parentElement;
  }

  list.value.$el.closeSlidingItems();
});

In fact, when switching the background, it should also trigger auto close.

@brandyscarney
Copy link
Member

Could you please provide a code example that demonstrates the issue you're experiencing and what you expect to happen? You can use one of the demos in our documentation by clicking the lightning icon to open it in StackBlitz, then fork and update it with your code sample. Additionally, please provide steps for us to follow to understand the problem and what the expected outcome is. Thank you!

@brandyscarney brandyscarney added ionitron: needs reproduction a code reproduction is needed from the issue author and removed triage labels May 31, 2024
Copy link

ionitron-bot bot commented May 31, 2024

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author
Projects
None yet
Development

No branches or pull requests

2 participants