Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export default function register(Component, tagName, propNames, options) {
Object.keys(Component.propTypes || {});
PreactElement.observedAttributes = propNames;

if (Component.formAssociated) {
PreactElement.formAssociated = true;
}

// Keep DOM properties and Preact props in sync
propNames.forEach((name) => {
Object.defineProperty(PreactElement.prototype, name, {
Expand Down