@ahrowe/ui 0.16.2 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/common/inputDropdown/inputDropdown.mjs +1 -1
- package/dist/esm/common/inputDropdown/inputDropdown.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/types/package/common/inputDropdown/inputDropdown.types.d.ts +2 -0
- package/docs/InputDropdown.md +3 -1
- package/package.json +1 -1
|
@@ -10,6 +10,8 @@ export interface InputDropdownProps extends HtmlProps {
|
|
|
10
10
|
label?: string;
|
|
11
11
|
value?: string;
|
|
12
12
|
formValidator?: FormValidator | null;
|
|
13
|
+
error?: string;
|
|
14
|
+
isRequired?: boolean;
|
|
13
15
|
items?: InputDropdownItem[];
|
|
14
16
|
/**
|
|
15
17
|
* Allow values that are not part of `items`. When true, the typed text is
|
package/docs/InputDropdown.md
CHANGED
|
@@ -60,7 +60,9 @@ interface InputDropdownItem {
|
|
|
60
60
|
| `onChange` | `(value: unknown) => void` | Called on every text change |
|
|
61
61
|
| `placeholder` | `string` | |
|
|
62
62
|
| `readOnly` | `boolean` | Make the field read-only — typing is blocked, the list won't open, and keyboard navigation/selection is disabled. Default `false` |
|
|
63
|
-
| `formValidator` | `FormValidator` | Connects to validation |
|
|
63
|
+
| `formValidator` | `FormValidator` | Connects to validation — shows the error state/message once the field has been touched (blurred), and the required mark (`*`) when the validator has a `required` validator |
|
|
64
|
+
| `error` | `string` | Manual error message (used when no `formValidator` is given) |
|
|
65
|
+
| `isRequired` | `boolean` | Shows the required mark (`*`) next to the label. Also inferred automatically when `formValidator` has a `required` validator. Default `false` |
|
|
64
66
|
|
|
65
67
|
**Slots:** `root` `dropdown` `item`
|
|
66
68
|
|