SL-Input and Aurelia #1807
Unanswered
ungerschwab
asked this question in
Help
Replies: 1 comment
-
This is a result of the shadow-dom not being fully rendered. Ideally you would want to do this: else {
await this.element.updateComplete
this.element.blur();
} I'm not overly familiar with the timings of the queueMicrotask, but the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm aware that Shoelace isn't formally supported in Aurelia, but I'm currently investigating to see if I can create a PoC to get it working in my existing Aurelia application.
However, I've run into a problem that I think is solvable. When I build out the control (specifically an
input
) for an Aurelia viewmodel, I run into a null reference error on the front end. Here's the stack trace:Here's the shoelace model:
What's happening is that when Aurelia goes to bind the handlers, the
input
doesn't seem like it's been created fully, so when the Aurelia binding fires:it correctly calls the shoelace
blur()
method on the element. but the shoelace handler forSlInput
blows up because the element doesn't have any data for its.input
property:How can I circumvent this problem to ensure that the bindings all fire when they should? Do I need to build a promise into the model somewhere?
Beta Was this translation helpful? Give feedback.
All reactions