File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -153,13 +153,13 @@ export default class Select2 extends Component {
153
153
return type === 'function' || ( value && type === 'object' ) || false ;
154
154
}
155
155
156
- makeOption ( item , k ) {
156
+ makeOption ( item ) {
157
157
if ( this . isObject ( item ) ) {
158
158
const { id, text, ...itemParams } = item ;
159
159
return ( < option key = { `option-${ id } ` } value = { id } { ...itemParams } > { text } </ option > ) ;
160
160
}
161
161
162
- return ( < option key = { `option-${ k } ` } value = { item } > { item } </ option > ) ;
162
+ return ( < option key = { `option-${ item } ` } value = { item } > { item } </ option > ) ;
163
163
}
164
164
165
165
render ( ) {
@@ -180,11 +180,11 @@ export default class Select2 extends Component {
180
180
const { children, text, ...itemParams } = item ;
181
181
return (
182
182
< optgroup key = { `optgroup-${ k } ` } label = { text } { ...itemParams } >
183
- { children . map ( ( child , k2 ) => this . makeOption ( child , ` ${ k } - ${ k2 } ` ) ) }
183
+ { children . map ( ( child ) => this . makeOption ( child ) ) }
184
184
</ optgroup >
185
185
) ;
186
186
}
187
- return this . makeOption ( item , k ) ;
187
+ return this . makeOption ( item ) ;
188
188
} ) }
189
189
</ select >
190
190
) ;
You can’t perform that action at this time.
0 commit comments