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
feat: Add new props for search, keyboard navigation, and scrolling
The new prop searchTerm can be used to set the initial search term or fully control the search semantics for a higher-order component. The new prop onSearchChange allows specification of a callback for when the search term changes or the search mode is activated or deactivated. The new prop disableKeyboardNavigation allows disabling all actions associated with a key down event in the search input box. The new prop pageSize can be used to control the size of the scroll view before scrolling to near the bottom is required to show more nodes.
-[Styling and Customization](#styling-and-customization)
71
75
-[Using default styles](#default-styles)
72
76
-[Customizing with Bootstrap, Material Design styles](#customizing-styles)
@@ -188,6 +192,12 @@ Type: `string`
188
192
189
193
Additional classname for container. The container renders with a default classname of `react-dropdown-tree-select`.
190
194
195
+
### searchTerm
196
+
197
+
Type: `string`
198
+
199
+
Initializes or adjusts the active search term. Set to an empty string or `undefined` to turn search mode off.
200
+
191
201
### clearSearchOnChange
192
202
193
203
Type: `bool`
@@ -256,6 +266,24 @@ Type: `function`
256
266
257
267
Fires when input box loses focus or the dropdown arrow is clicked again (and the dropdown collapses). This is helpful for setting `dirty` or `touched` flags with forms.
258
268
269
+
### onSearchChange
270
+
271
+
Type: `function`
272
+
273
+
Called when the search input box is changed with the current search term. This can be fired either through user input or automatically due to `clearSearchOnChange`. Example:
`disablePoppingOnBackspace=true` attribute indicates that when a user triggers a 'backspace' keyDown in the empty search bar, the tree will not deselect nodes.
430
464
465
+
### disableKeyboardNavigation
466
+
467
+
Type: `bool` (default: `false`)
468
+
469
+
`disableKeyboardNavigation=true` prevents keyboard navigation actions from being taken on the nodes when the user triggers a keyDown in the search bar. This restores standard input box semantics.
0 commit comments