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

Button: not possible to set disabled state more than once #5928

Closed
whernebrink opened this issue Dec 6, 2021 · 4 comments · Fixed by #6035
Closed

Button: not possible to set disabled state more than once #5928

whernebrink opened this issue Dec 6, 2021 · 4 comments · Fixed by #6035
Assignees
Labels
team: m3 Issues for m3 and sub teams type: bug 🐛 [2] Velocity rating (Fibonacci)

Comments

@whernebrink
Copy link

No able to update the disable state of button in flex toolbar in CAP dialog more than once.

Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/ids-enterprise-10110-lbtbab
  2. Click on Open Cap button
  3. Add text in the form input
  4. Delete everything in the form input
  5. See Save button now disabled (the form is invalid)
  6. Now, add text to the form input (making the form valid)
  7. Save button is still disabled, i.e. myButton.updated({ disabled: !isValid }) did not do anything.

Expected behavior
When calling button.updated({ disabled: true/false }) the updated setting should be reflected in the UI.

Version

  • ids-enterprise: v4.58.0
  • ids-enterprise-ng: v10.11.0

Screenshots
image

How i'm calling the updated():
image

Platform

  • Infor Application/Team Name: Infor M3
  • OS Version: Big Sur
  • Browser Name: Firefox (but shouldn't matter)

Additional context
I think it has to do with the code starting on line 315 in Button.js:

// Handle a one-time `disabled` setting, if defined.
if (this.settings.disabled) {
  this.disabled = this.settings.disabled === true;
  delete this.settings.disabled;
}

If i've called the update with disabled: true and then want to remove that disabled, the setting will have to be false, but will never enter the codeblock to actually set this.disabled = false, so it will keep being disabled.

@tmcconechy tmcconechy added [2] Velocity rating (Fibonacci) type: bug 🐛 labels Dec 6, 2021
@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Dec 6, 2021
@tmcconechy tmcconechy added the team: m3 Issues for m3 and sub teams label Jan 6, 2022
@tmcconechy tmcconechy added this to To do in Enterprise 4.60.x (Jan 2022) Sprint via automation Jan 6, 2022
@tmcconechy
Copy link
Member

@whernebrink seems like when i type in the example that it is giving an error now? Any ideas...

@whernebrink
Copy link
Author

whernebrink commented Jan 7, 2022

@tmcconechy that's weird. Can't recall I've seen that before.

This is the error when entering in the input in the component in the CAP:
image

And since I havn't added anything to the example stackblitz more than the CAP component and the code for opening the CAP, the only accordionAPI there can be is in regards to the application-menu. When entered something in the application menu searchfield input we get the same error.

So, I set [filterable]="false" on the <nav soho-application-menu> in app.html will not yield any errors.

No idea why the accordionAPI is undefined (why filtering is not working for the application menu) or why that error would appear when entering in then input field in the CAP dialog? Must be some event bubbling?

Seems like an unrelated issues to this reported issue though?

@tmcconechy
Copy link
Member

ok thanks - lets see if we can make a local example @tjamesallen15

@tjamesallen15 tjamesallen15 moved this from To do to In progress in Enterprise 4.60.x (Jan 2022) Sprint Jan 14, 2022
@tmcconechy tmcconechy moved this from In progress to Pending Review in Enterprise 4.60.x (Jan 2022) Sprint Jan 18, 2022
@tmcconechy tmcconechy moved this from Pending Review to Ready for QA (beta) in Enterprise 4.60.x (Jan 2022) Sprint Jan 19, 2022
@janahintal
Copy link
Contributor

@janahintal janahintal moved this from Ready for QA (beta) to Done in Enterprise 4.60.x (Jan 2022) Sprint Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: m3 Issues for m3 and sub teams type: bug 🐛 [2] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants