You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/select/README.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,6 @@ function ControlledSelect() {
97
97
|`value`|`string`| Sets the `<Option />` that will appear selected and makes the component a controlled component. |`''`|
98
98
|`defaultValue`|`string`| Sets the `<Option />` that will appear selected on page load when the component is uncontrolled. |`''`|
99
99
|`onChange`|`function`| A function that gets called when the selected value changes. Receives the value string as the first argument. |`() => {}`|
100
-
|`readOnly`|`boolean`| Disables the console warning when the component is controlled and no `onChange` prop is provided. |`false`|
101
100
|`allowDeselect`|`boolean`| Enables or disables the option for a user to select a null default value. |`true`|
102
101
|`open`|`boolean`| Controls whether the dropdown menu is open. When provided, the component becomes a controlled component for the open state. ||
103
102
|`setOpen`|`function`| Callback function that is called when the open state should change. Required when `open` prop is provided. Receives a boolean value as the first argument. ||
* `value` makes the component a controlled component and using `defaultValue` makes it uncontrolled.
145
145
*/
@@ -148,7 +148,6 @@ export type SelectProps = BaseSelectProps &
148
148
* `value` makes the component a controlled component and using `defaultValue` makes it uncontrolled.
149
149
*/
150
150
value?: undefined;
151
-
}&{
152
151
/**
153
152
* A function that takes in the value of the selected option, and the event that was used to select the value (i.e. React.MouseEvent | KeyboardEvent | React.KeyboardEvent).
154
153
*
@@ -158,25 +157,19 @@ export type SelectProps = BaseSelectProps &
* Indicates that the component's value cannot be changed.
166
+
* A function that takes in the value of the selected option, and the event that was used to select the value (i.e. React.MouseEvent | KeyboardEvent | React.KeyboardEvent).
167
+
*
168
+
* Note: This API is different from the native HTML `<select>` element's `onChange` prop given the current technical design of this component.
163
169
*/
164
-
readOnly?: false;
165
-
})
166
-
// Controlled
167
-
|({value: string;defaultValue?: undefined}&(
168
-
|{
169
-
/**
170
-
* A function that takes in the value of the selected option, and the event that was used to select the value (i.e. React.MouseEvent | KeyboardEvent | React.KeyboardEvent).
171
-
*
172
-
* Note: This API is different from the native HTML `<select>` element's `onChange` prop given the current technical design of this component.
0 commit comments