Skip to content

Commit 6705b3c

Browse files
committed
~ Fixed DOM attribute warning on Input
1 parent 1f6c0b8 commit 6705b3c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
33
The format is based on [EZEZ Changelog](https://ezez.dev/guidelines/changelog/)
44
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## [0.27.7] - 2025-01-05
7+
### Dev
8+
- Fixed DOM attribute warning on `Input`
9+
610
## [0.27.6] - 2025-01-05
711
### Breaking
812
- `Action` in a button mode has a `type=button` as default

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-miui",
3-
"version": "0.27.6",
3+
"version": "0.27.7",
44
"author": "Jacek Nowacki",
55
"license": "MIT",
66
"scripts": {

src/components/form/input/Input.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const Input = <T extends string>({ // eslint-disable-line max-lines-per-function
2626
onFocus, onBlur, onKeyDown, onChange,
2727
suggestions,
2828
onSuggestionMatch,
29+
error,
2930
...props
3031
}: Props<T>): ReturnType<React.FC<Props<T>>> => {
3132
const [focused, setFocused] = useState(false);
@@ -83,7 +84,7 @@ const Input = <T extends string>({ // eslint-disable-line max-lines-per-function
8384
focused={Boolean(focused)}
8485
disabled={Boolean(props.disabled)}
8586
readOnly={Boolean(props.readOnly)}
86-
error={Boolean(props.error)}
87+
error={Boolean(error)}
8788
>
8889
{prefixElem}
8990
<StyledInput
@@ -93,7 +94,7 @@ const Input = <T extends string>({ // eslint-disable-line max-lines-per-function
9394
onKeyDown={handleKeyDown}
9495
onFocus={handleFocus}
9596
onBlur={handleBlur}
96-
data-error={Boolean(props.error)}
97+
data-error={Boolean(error)}
9798
/>
9899
<Suggestions id={suggestionsId} suggestions={suggestions} />
99100
{suffixElem}

0 commit comments

Comments
 (0)