-
Notifications
You must be signed in to change notification settings - Fork 462
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
🐞 - TuiError produce an error with PolymorpheusComponent #7525
Comments
Looks like the only way to fix it would be to wrap primitive values into objects, but that would be breaking change 🤔 |
It can be wrapped only for components and templates but if it didn't work before could it be considered as a breaking change?😄 |
If we manage to do it only for components and templates — it won't be breaking :) |
I see that it could be for component only since template examples works https://github.com/taiga-family/ng-polymorpheus/blob/main/projects/ng-polymorpheus/src/directives/outlet.ts#L65 |
It would work but you won't be able to get value of the error since templates can only access keys of the context object: <ng-template #tmp let-value="key">{{ value }}</ng-template> |
Yep, so the goal is to try to wrap a primitive into the object for templates and components? It shouldn't be a breaking change for templates since it didn't work properly before(did work only if you hadn't reached a context). Is it a priority bug for you or should I consider making a PR? |
We are currently working very hard to finish 4.0 so this won't be on our radar for a while. You can think on the fix in the meantime. I wonder if it's better to fix it in polymorpheus so it works everywhere. Current |
Why not just use @ngneat/error-tailor and avoid the |
Moving it to ng-polymorpheus: taiga-family/ng-polymorpheus#449 |
Playground Link
https://stackblitz.com/edit/angular-mwny1a?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.module.ts&hideExplorer=1
Description
When I provide the
TUI_VALIDATION_ERRORS
object withPolymorpheusComponent
as a value in it an error occursError: Cannot create a proxy with a non-object as target or handler
. It's becauserequired
error hastrue
value here. Also, I haven't seen any examples with components on the Taiga.ui and this issue hadn't been faced with before but sinceTUI_VALIDATION_ERRORS
allowsPolymorpheusContent
I'm expecting it works properly withPolymorpheusComponent
.Angular version
12.2.17
Taiga UI version
3.79.0
Which browsers have you used?
Which operating systems have you used?
The text was updated successfully, but these errors were encountered: