Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 7 additions & 3 deletions apps/examples/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ function Shell(): React.MixedElement {
<html.div />
{/*<html.input placeholder="input type:date" type="date" />*/}
<html.div />
<html.input placeholder="input type:email" type="email" />
<html.input
name="name-input"
placeholder="input type:email"
type="email"
/>
<html.div />
<html.input placeholder="input type:number" type="number" />
<html.div />
Expand All @@ -237,15 +241,15 @@ function Shell(): React.MixedElement {
<html.div />
<html.input enterKeyHint="go" placeholder="input enterKeyHint:go" />
<html.div />
<html.select>
<html.select name="name-select">
<html.optgroup label="optgroup">
<html.option label="option 1" />
<html.option label="option 2" />
<html.option label="option 3" />
</html.optgroup>
</html.select>
<html.div />
<html.textarea placeholder="textarea" />
<html.textarea name="name-textarea" placeholder="textarea" />
</ExampleBlock>

<ExampleBlock title="CSS Animations">
Expand Down
1 change: 1 addition & 0 deletions apps/website/docs/api/03-html/05-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const Foo = () => (
* `min`
* `minLength`
* `multiple`
* `name`
* `onBeforeInput`
* `onChange`
* `onInput`
Expand Down
1 change: 1 addition & 0 deletions apps/website/docs/api/03-html/10-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const Foo = () => (
* [...Common props](/api/html/common/)
* `autoComplete`
* `multiple`
* `name`
* `required`
* `onBeforeInput`
* `onChange`
Expand Down
1 change: 1 addition & 0 deletions apps/website/docs/api/03-html/11-textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const Foo = () => (
* `disabled`
* `maxLength`
* `minLength`
* `name`
* `onBeforeInput`
* `onChange`
* `onInput`
Expand Down
3 changes: 3 additions & 0 deletions apps/website/docs/api/03-html/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ The following tables represent the compatibility status of the strict HTML API s
| minLength (input) | ❌ | ❌ | |
| minLength (textarea) | ❌ | ❌ | |
| multiple (select) | ❌ | ❌ | |
| name (input) | ❌ | ❌ | |
| name (select) | ❌ | ❌ | |
| name (textarea) | ❌ | ❌ | |
| onAuxClick | ❌ | ❌ | [#38](https://github.com/facebook/react-strict-dom/issues/38) |
| onBeforeInput (input) | ❌ | ❌ | [#38](https://github.com/facebook/react-strict-dom/issues/38) |
| onBeforeInput (select) | ❌ | ❌ | [#38](https://github.com/facebook/react-strict-dom/issues/38) |
Expand Down
1 change: 1 addition & 0 deletions packages/react-strict-dom/src/shared/isPropAllowed.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const strictAttributeSet: Set<string> = new Set([
'min', // input
'minLength', // input, textarea
'multiple', // input, select
'name', // input, select, textarea
'onAuxClick',
'onBeforeInput', // input, select, textarea
'onBlur',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type StrictReactDOMInputProps = $ReadOnly<{
min?: ?(string | number),
minLength?: ?number,
multiple?: ?boolean,
name?: ?string,
onBeforeInput?: $FlowFixMe,
onChange?: $FlowFixMe,
onInput?: $FlowFixMe,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type StrictReactDOMSelectProps = $ReadOnly<{
...StrictReactDOMProps,
autoComplete?: AutoComplete,
multiple?: ?boolean,
name?: ?string,
required?: ?boolean,
onBeforeInput?: $FlowFixMe,
onChange?: $FlowFixMe,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type StrictReactDOMTextAreaProps = $ReadOnly<{
disabled?: ?boolean,
maxLength?: ?number,
minLength?: ?number,
name?: ?string,
onBeforeInput?: $FlowFixMe,
onChange?: $FlowFixMe,
onInput?: $FlowFixMe,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3552,6 +3552,7 @@ exports[`html "input" supports additional input attributes 1`] = `
min="0"
minLength="0"
multiple={true}
name="user-firstname"
onBeforeInput={[Function]}
onChange={[Function]}
onInput={[Function]}
Expand Down Expand Up @@ -5477,6 +5478,7 @@ exports[`html "select" supports additional select attributes 1`] = `
<select
className="html-select x1y0btm7 x1ghz6dp x1717udv"
disabled={true}
name="user-language"
onBeforeInput={[Function]}
onChange={[Function]}
onInput={[Function]}
Expand Down Expand Up @@ -6168,6 +6170,7 @@ exports[`html "textarea" supports additional textarea attributes 1`] = `
disabled={true}
maxLength="10"
minLength="0"
name="user-message"
onBeforeInput={[Function]}
onChange={[Function]}
onInput={[Function]}
Expand Down
3 changes: 3 additions & 0 deletions packages/react-strict-dom/tests/html-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ describe('html', () => {
min="0"
minLength="0"
multiple={true}
name="user-firstname"
onBeforeInput={function onBeforeInput() {}}
onChange={function onChange() {}}
onInput={function onInput() {}}
Expand Down Expand Up @@ -363,6 +364,7 @@ describe('html', () => {
root = create(
<html.select
disabled={true}
name="user-language"
onBeforeInput={function onBeforeInput() {}}
onChange={function onChange() {}}
onInput={function onInput() {}}
Expand All @@ -386,6 +388,7 @@ describe('html', () => {
disabled={true}
maxLength="10"
minLength="0"
name="user-message"
onBeforeInput={function onBeforeInput() {}}
onChange={function onChange() {}}
onInput={function onInput() {}}
Expand Down