-
Notifications
You must be signed in to change notification settings - Fork 7
Form controls submit their form on Enter #337
Conversation
🦋 Changeset detectedLatest commit: 857791f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
expect(component.value).to.deep.equal(['two']); | ||
}); | ||
|
||
it('has `formData` value when an option is selected', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these deleted tests duplicate tests in dropdown.test.form.single.ts
and dropdown.test.form.multiple.ts
.
501577e
to
4ea32a4
Compare
</script> | ||
<form style="padding: 1.5rem;"> | ||
<form action="/" style="padding: 1.5rem;"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd think action="/?path=/docs/checkbox--overview"
would navigate to the Checkbox story, which would be ideal. But it navigates to /
. And action="?path=/docs/checkbox--overview"
404s.
4ea32a4
to
954ad71
Compare
954ad71
to
857791f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
@blur=${this.#onBlur} | ||
@change=${this.#onChange} | ||
@input=${this.#onInput} | ||
@keydown=${this.#onKeydown} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the input stories with forms. Should they be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that too. There should be. I'll be following up with more Storybook improvements when @danwenzel merges that PR. I'll wrap Input in a <form>
as part of that work.
🚀 Description
Another thing we don't get for free—even when we use a native form control internally 🤷♂️.
📋 Checklist
🔬 How to Test
📸 Images/Videos of Functionality
N/A