-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Cannot read property 'trim' of undefined with ButtonDirective #10354
Comments
This is the problem that #10348 fixes |
Confirm issue. For what it is worth: if you use |
I encountered this issue while trying to dynamically update a pButton label with a pipe. Using PrimeNG 12 |
Same here. Label in pButton with a pipe and I get the same error after a change of the label value. |
Occurred with me when using ngx-translate. To resolve the bug, momentarily use: icon="pi" like: <button pButton icon="pi" label="{{ 'CONSTANT' | translate }} ...> |
Same issue, using |
If you have a PrimeNG PRO Support subscription please post your issue at;
https://pro.primefaces.org
where our team will respond within 4 business hours.
If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that
your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.
Current Queue Time for Review
Without PRO Support: ~8-12 weeks.
With PRO Support: 1 hour
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://stackblitz.com/github/primefaces/primeng-issue-template
Current behavior
Cannot read property 'trim' of undefined form Domhandler
Error will be thrown:
core.js:6456 ERROR TypeError: Cannot read property 'trim' of undefined
at Function.addMultipleClasses (:4200/vendor.js:137611)
at ButtonDirective.createIconEl (:4200/vendor.js:132099)
at ButtonDirective.setIconClass (:4200/vendor.js:132114)
at ButtonDirective.set label [as label] (:4200/vendor.js:132132)
at setInputsForProperty (:4200/vendor.js:28676)
at elementPropertyInternal (:4200/vendor.js:27720)
at ɵɵpropertyInterpolate1 (:4200/vendor.js:33287)
at Module.ɵɵpropertyInterpolate (:4200/vendor.js:33250)
The bug was introduced with #10277
There must be a test in createIconEl method for line:
DomHandler.addMultipleClasses(iconElement, this.getIconClass());
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
12.0.0
The text was updated successfully, but these errors were encountered: