Skip to content

Commit 715c817

Browse files
committed
Remove onChange attribute from overridden HTMLInputElement attribute
1 parent 557786f commit 715c817

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/components/CheckboxInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useApiState } from '../use/context'
1313
*
1414
* The `status` prop takes precedence over the context error.
1515
*/
16-
const CheckboxInput: React.FC<CheckboxInputProps & React.HTMLAttributes<HTMLInputElement>> = (props) => {
16+
const CheckboxInput: React.FC<CheckboxInputProps & Omit<React.HTMLAttributes<HTMLInputElement>, 'onChange'>> = (props) => {
1717
const {
1818
value,
1919
status,

src/components/SelectInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useApiState } from '../use/context'
1313
*
1414
* The `status` prop takes precedence over the context error.
1515
*/
16-
const SelectInput: React.FC<SelectInputProps & React.HTMLAttributes<HTMLSelectElement>> = (props) => {
16+
const SelectInput: React.FC<SelectInputProps & Omit<React.HTMLAttributes<HTMLSelectElement>, 'onChange'>> = (props) => {
1717
const {
1818
status,
1919
id,

src/components/TextInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { useApiState } from '../use/context'
2525
* </AutoForm>
2626
* ```
2727
*/
28-
const TextInput = forwardRef<TextInputRef, TextInputProps & React.HTMLAttributes<HTMLInputElement>>(
28+
const TextInput = forwardRef<TextInputRef, TextInputProps & Omit<React.HTMLAttributes<HTMLInputElement>, 'onChange'>>(
2929
(props, ref) => {
3030
const {
3131
status,

src/components/TextareaInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useApiState } from '../use/context'
1313
*
1414
* The `status` prop takes precedence over the context error.
1515
*/
16-
const TextareaInput: React.FC<TextareaInputProps & React.HTMLAttributes<HTMLTextAreaElement>> = (props) => {
16+
const TextareaInput: React.FC<TextareaInputProps & Omit<React.HTMLAttributes<HTMLTextAreaElement>, 'onChange'>> = (props) => {
1717
const {
1818
status,
1919
id,

0 commit comments

Comments
 (0)