ux icon indicating copy to clipboard operation
ux copied to clipboard

[Live] Unfriendly JS error if you forget to expose a LiveProp then use it

Open weaverryan opened this issue 3 years ago • 3 comments

Relates somewhat to #425, where this system may be changed.

Pretty simple:

class MyComponent
{
    #[LiveProp()]
    public Invoice $invoice;
}

Then in the template:

<input data-model="invoice.customerName">

This results in an ugly JS error:

Cannot read properties of null (reading 'customerName')

weaverryan avatar Nov 07 '22 15:11 weaverryan

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Apr 25 '24 12:04 carsonbot

Friendly ping? Should this still be open? I will close if I don't hear anything.

carsonbot avatar May 11 '24 07:05 carsonbot

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

carsonbot avatar May 25 '24 14:05 carsonbot

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Nov 26 '24 12:11 carsonbot

Could I get a reply or should I close this?

carsonbot avatar Dec 10 '24 12:12 carsonbot

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

carsonbot avatar Dec 24 '24 12:12 carsonbot

Fixed by #1210,

live_controller-1e20d818103e24e81a35d46c3e98145c.js:2025 Uncaught Error: Invalid model name "dumbDto.name". at Component.set (live_controller-1e20d818103e24e81a35d46c3e98145c.js:2025:19) at t.updateModelFromElementEvent (live_controller-1e20d818103e24e81a35d46c3e98145c.js:3156:24) at t.handleInputEvent (live_controller-1e20d818103e24e81a35d46c3e98145c.js:3105:14) at HTMLDivElement.callback (live_controller-1e20d818103e24e81a35d46c3e98145c.js:2925:57)

Kocal avatar Jun 12 '25 05:06 Kocal