@@ -20,6 +20,8 @@ class WithOptions extends PureComponent {
20
20
disabled : false ,
21
21
readOnly : false ,
22
22
hierarchical : false ,
23
+ placeholderText : 'Choose...' ,
24
+ inlinePlaceholderText : 'Search...' ,
23
25
}
24
26
}
25
27
@@ -48,6 +50,8 @@ class WithOptions extends PureComponent {
48
50
readOnly,
49
51
showDropdown,
50
52
inlineSearchInput,
53
+ placeholderText,
54
+ inlinePlaceholderText,
51
55
} = this . state
52
56
53
57
return (
@@ -83,6 +87,22 @@ class WithOptions extends PureComponent {
83
87
< option value = "always" > Always</ option >
84
88
</ select >
85
89
</ div >
90
+ < div style = { { marginBottom : '10px' } } >
91
+ < label htmlFor = "placeholderText" > Placeholder text: </ label >
92
+ < input
93
+ id = "placeholderText"
94
+ value = { placeholderText }
95
+ onChange = { e => this . setState ( { placeholderText : e . target . value } ) }
96
+ />
97
+ </ div >
98
+ < div style = { { marginBottom : '10px' } } >
99
+ < label htmlFor = "inlinePlaceholderText" > Inline placeholder text: </ label >
100
+ < input
101
+ id = "inlinePlaceholderText"
102
+ value = { inlinePlaceholderText }
103
+ onChange = { e => this . setState ( { inlinePlaceholderText : e . target . value } ) }
104
+ />
105
+ </ div >
86
106
< Checkbox
87
107
label = "Inline Search Input"
88
108
value = "inlineSearchInput"
@@ -130,6 +150,8 @@ class WithOptions extends PureComponent {
130
150
showPartiallySelected = { showPartiallySelected }
131
151
disabled = { disabled }
132
152
readOnly = { readOnly }
153
+ placeholder = { placeholderText }
154
+ inlineSearchPlaceholder = { inlinePlaceholderText }
133
155
inlineSearchInput = { inlineSearchInput }
134
156
showDropdown = { showDropdown }
135
157
texts = { { label : 'Demo Dropdown' } }
0 commit comments