@@ -171,8 +171,6 @@ class ReactTags extends React.Component {
171171 }
172172
173173 render ( ) {
174- const listboxId = 'ReactTags-listbox'
175-
176174 const TagComponent = this . props . tagComponent || Tag
177175
178176 const tags = this . props . tags . map ( ( tag , i ) => (
@@ -190,7 +188,10 @@ class ReactTags extends React.Component {
190188
191189 return (
192190 < div className = { classNames . join ( ' ' ) } onClick = { this . onClick . bind ( this ) } >
193- < div className = { this . state . classNames . selected } aria-live = 'polite' aria-relevant = 'additions removals' >
191+ < div
192+ className = { this . state . classNames . selected }
193+ aria-relevant = 'additions removals'
194+ aria-live = 'polite' >
194195 { tags }
195196 </ div >
196197 < div
@@ -200,14 +201,14 @@ class ReactTags extends React.Component {
200201 onKeyDown = { this . onKeyDown . bind ( this ) }
201202 onInput = { this . onInput . bind ( this ) } >
202203 < Input { ...this . state }
204+ id = { this . props . id }
203205 ref = { ( c ) => { this . input = c } }
204- listboxId = { listboxId }
205206 autoresize = { this . props . autoresize }
206207 expanded = { expanded }
207208 placeholder = { this . props . placeholder } />
208209 < Suggestions { ...this . state }
210+ id = { this . props . id }
209211 ref = { ( c ) => { this . suggestions = c } }
210- listboxId = { listboxId }
211212 expanded = { expanded }
212213 addTag = { this . addTag . bind ( this ) } />
213214 </ div >
@@ -217,6 +218,7 @@ class ReactTags extends React.Component {
217218}
218219
219220ReactTags . defaultProps = {
221+ id : 'ReactTags' ,
220222 tags : [ ] ,
221223 placeholder : 'Add new tag' ,
222224 suggestions : [ ] ,
@@ -230,6 +232,7 @@ ReactTags.defaultProps = {
230232}
231233
232234ReactTags . propTypes = {
235+ id : PropTypes . string ,
233236 tags : PropTypes . arrayOf ( PropTypes . object ) ,
234237 placeholder : PropTypes . string ,
235238 suggestions : PropTypes . arrayOf ( PropTypes . object ) ,
0 commit comments