File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ A lightweight and fast control to render a select component that can display hie
43
43
* [ onNodeToggle] ( #onnodetoggle )
44
44
* [ data] ( #data )
45
45
* [ placeholderText] ( #placeholdertext )
46
+ * [ noMatchesText] ( #noMatchesText )
46
47
* [ keepTreeOnSearch] ( #keeptreeonsearch )
47
48
* [ simpleSelect] ( #simpleselect )
48
49
* [ Styling and Customization] ( #styling-and-customization )
@@ -225,6 +226,12 @@ Type: `string`
225
226
226
227
The text to display as placeholder on the search box. Defaults to ` Choose... `
227
228
229
+ ### noMatchesText
230
+
231
+ Type: ` string `
232
+
233
+ The text to display when the search does not find results in the content list. Defaults to ` No matches found `
234
+
228
235
### keepTreeOnSearch
229
236
230
237
Type: ` bool `
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ class DropdownTreeSelect extends Component {
26
26
onChange : PropTypes . func ,
27
27
onAction : PropTypes . func ,
28
28
onNodeToggle : PropTypes . func ,
29
- simpleSelect : PropTypes . bool
29
+ simpleSelect : PropTypes . bool ,
30
+ noMatchesText : PropTypes . string
30
31
}
31
32
32
33
constructor ( props ) {
@@ -166,7 +167,7 @@ class DropdownTreeSelect extends Component {
166
167
{ this . state . showDropdown && (
167
168
< div className = { cx ( 'dropdown-content' ) } >
168
169
{ this . state . allNodesHidden ? (
169
- < span className = "no-matches" > No matches found</ span >
170
+ < span className = "no-matches" > { this . props . noMatchesText || ' No matches found' } </ span >
170
171
) : (
171
172
< Tree
172
173
data = { this . state . tree }
You can’t perform that action at this time.
0 commit comments