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

igxToggle: setOffset function increments the offset instead of setting a specific value #14174

Open
gmartinezig opened this issue Apr 25, 2024 · 1 comment · May be fixed by #14226
Open

igxToggle: setOffset function increments the offset instead of setting a specific value #14174

gmartinezig opened this issue Apr 25, 2024 · 1 comment · May be fixed by #14226
Assignees
Labels
overlay toggle 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@gmartinezig
Copy link

Description

setOffset function increments the current offset value instead of setting a specific value

  • igniteui-angular version: ^17.0.0
  • browser: All

Steps to reproduce

  1. Go to the following sample:
    https://www.infragistics.com/products/ignite-ui-angular/angular/components/toggle#offsetting-the-toggle-container
  2. Click the TOGGLE button several times

Result

offsetting-the-toggle-container-bug

Expected result

The toggle popup should be always offset 30px from the target element

@gmartinezig gmartinezig added 🐛 bug Any issue that describes a bug 🆕 status: new labels Apr 25, 2024
@Lipata Lipata self-assigned this Apr 25, 2024
@georgianastasov georgianastasov added 🛠️ status: in-development Issues and PRs with active development on them toggle and removed 🆕 status: new labels May 14, 2024
@georgianastasov georgianastasov added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. 🛠️ status: in-development Issues and PRs with active development on them 🧰 feature-request overlay and removed 🛠️ status: in-development Issues and PRs with active development on them ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. 🐛 bug Any issue that describes a bug labels May 15, 2024
@georgianastasov
Copy link
Contributor

georgianastasov commented May 21, 2024

Suggested Improvement For Feature

After discussing with @wnvko, we identified that this behavior could be modified to better suit different use cases. Specifically, there are two main approaches to the setOffset function:

  • Relative Positioning: The current implementation where the offset is applied relative to the current position.
  • Absolute Positioning: A new implementation where the offset is set to an absolute value relative to the target element.

Both approaches are valid and have their own applications. To accommodate both use cases and avoid a breaking change, we will introduce a third parameter to the setOffset method. This parameter will allow clients to choose the desired positioning behavior.

@georgianastasov georgianastasov added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
overlay toggle 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants