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: README.md
+14-26Lines changed: 14 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,17 +45,14 @@ A lightweight and fast control to render a select component that can display hie
45
45
-[onChange](#onchange)
46
46
-[onNodeToggle](#onnodetoggle)
47
47
-[data](#data)
48
-
-[placeholderText](#placeholdertext)
49
-
-[noMatchesText](#nomatchestext)
48
+
-[texts](#texts)
50
49
-[keepTreeOnSearch](#keeptreeonsearch)
51
50
-[keepChildrenOnSearch](#keepchildrenonsearch)
52
51
-[simpleSelect](#simpleselect)
53
52
-[showPartiallySelected](#showpartiallyselected)
54
53
-[showDropdown](#showDropdown)
55
54
-[form states (disabled|readOnly)](#formstates)
56
55
-[id](#id)
57
-
-[label](#label)
58
-
-[labelRemove](#labelRemove)
59
56
-[Styling and Customization](#styling-and-customization)
60
57
-[Using default styles](#default-styles)
61
58
-[Customizing with Bootstrap, Material Design styles](#customizing-styles)
@@ -280,17 +277,20 @@ The `action` object requires the following structure:
280
277
281
278
An array renders a tree with multiple root level items whereas an object renders a tree with a single root element (e.g. a `Select All` root node).
282
279
283
-
### placeholderText
280
+
### texts
284
281
285
-
Type: `string`
286
-
287
-
The text to display as placeholder on the search box. Defaults to `Choose...`
282
+
Texts to override output for
288
283
289
-
### noMatchesText
290
-
291
-
Type: `string`
284
+
The `texts` object requires the following structure:
292
285
293
-
The text to display when the search does not find results in the content list. Defaults to `No matches found`
286
+
```js
287
+
{
288
+
placeholder, // optional: The text to display as placeholder on the search box. Defaults to `Choose...`
289
+
noMatches, // optional: The text to display when the search does not find results in the content list. Defaults to `No matches found`
290
+
label, // optional: Adds `aria-labelledby` to search input when input starts with `#`, adds `aria-label` to search input when label has value (not containing '#')
291
+
labelRemove, // optional: The text to display for `aria-label` on tag delete buttons which is combined with `aria-labelledby` pointing to the node label. Defaults to `Remove`
292
+
}
293
+
```
294
294
295
295
### keepTreeOnSearch
296
296
@@ -339,18 +339,6 @@ Specific id for container. The container renders with a default id of `rdtsN` wh
339
339
340
340
Use to ensure a own unique id when a simple counter is not sufficient, e.g in a partial server render (SSR)
341
341
342
-
### label
343
-
344
-
Type: `string`
345
-
346
-
Adds `aria-labelledby` to search input when input starts with `#`, adds `aria-label` to search input when label has value (not containing '#')
347
-
348
-
### labelRemove
349
-
350
-
Type: `string`
351
-
352
-
The text to display for `aria-label` on tag delete buttons which is combined with `aria-labelledby` pointing to the node label. Defaults to `Remove`
353
-
354
342
## Styling and Customization
355
343
356
344
### Default styles
@@ -443,10 +431,10 @@ Node toggling also achieves the expand/collapse effect by manipulating css class
443
431
444
432
### How do I change the placeholder text?
445
433
446
-
The default [placeholder](#placeholdertext) is `Choose...`. If you want to change this to something else, you can use `placeholderText` property to set it.
434
+
The default [placeholder](#texts) is `Choose...`. If you want to change this to something else, you can use `placeholder` property to set it.
| Added a new radio select mode<br>Selection is done in a shared mode-prop |`simpleSelect={true}` / `simpleSelect`|`mode='simpleSelect'`|
10
+
| Bundled text props into a single object |`placeholderText='My text'`<br>`noMatchesText='No matches'`|`texts={{ placeholder: 'My text', noMatches: 'No matches' }}`|
* Use to ensure a own unique id when a simple counter is not sufficient, e.g in a partial server render (SSR)
71
69
*/
72
70
id?: string;
73
-
/** Adds `aria-labelledby` to search input when input starts with `#`, adds `aria-label` to search input when label has value (not containing '#') */
74
-
label?: string;
75
-
/** The text to display for `aria-label` on tag delete buttons which is combined with `aria-labelledby` pointing to the node label. Defaults to `Remove */
/** The text to display as placeholder on the search box. Defaults to Choose... */
125
+
placeholderT: string;
126
+
/** The text to display when the search does not find results in the content list. Defaults to No matches found */
127
+
noMatches: string;
128
+
/** Adds `aria-labelledby` to search input when input starts with `#`, adds `aria-label` to search input when label has value (not containing '#') */
129
+
label?: string;
130
+
/** The text to display for `aria-label` on tag delete buttons which is combined with `aria-labelledby` pointing to the node label. Defaults to `Remove */
0 commit comments