open-wc / form-participation

Helper, mixins, tools, and more for supporting your custom elements in participating in an ancestor form.
MIT License
53 stars 7 forks source link

Uncaught (in promise) Error using classfield with a new vite lit-ts project #14

Closed lukaskoeller closed 2 years ago

lukaskoeller commented 2 years ago

Reproducing

When I set up a new vite project using the lit-ts template, and using this component while installing @open-wc/form-control I am getting the following error.

🐛 Reproduced Error Demo

Error

Uncaught (in promise) Error: The following properties on element fd-input will not trigger updates as expected because they are set using class fields: value. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.
    at Input.performUpdate (reactive-element.ts:1275:17)
    at Input.scheduleUpdate (reactive-element.ts:1234:17)
    at Input.__enqueueUpdate (reactive-element.ts:1206:25)

Expected Behavior

The component works just fine as it does in this Demo

Actual Behavior

The app is just showing nothing instead and throws the above mentioned error

Screenshot 2022-03-08 at 22 50 22
calebdwilliams commented 2 years ago

Hey @lukaskoeller the API has changed a little bit for the mixin but this shouldn't be a problem any more. Can you confirm so we can close this issue?

calebdwilliams commented 2 years ago

Closing this issue as inactive.