Commit fe35b60 1 parent fd91895 commit fe35b60 Copy full SHA for fe35b60
File tree 1 file changed +4
-4
lines changed
packages/material/src/Select
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ const SelectInput = $.defineComponent(function SelectInput(props) {
401
401
prevProps : PropsOf < MenuItemTypeMap >
402
402
) => {
403
403
let newValue : any ;
404
- const child = { props : itemProps } ;
404
+ const childValue = itemProps . value ;
405
405
406
406
const multiple = props . multiple ;
407
407
// We use the tabindex attribute to signal the available options.
@@ -411,14 +411,14 @@ const SelectInput = $.defineComponent(function SelectInput(props) {
411
411
412
412
if ( multiple ) {
413
413
newValue = Array . isArray ( value ( ) ) ? value ( ) . slice ( ) : [ ] ;
414
- const itemIndex = value ( ) . indexOf ( child . props . value ) ;
414
+ const itemIndex = value ( ) . indexOf ( childValue ) ;
415
415
if ( itemIndex === - 1 ) {
416
- newValue . push ( child . props . value ) ;
416
+ newValue . push ( childValue ) ;
417
417
} else {
418
418
newValue . splice ( itemIndex , 1 ) ;
419
419
}
420
420
} else {
421
- newValue = child . props . value ;
421
+ newValue = childValue ;
422
422
}
423
423
424
424
if ( typeof prevProps . onClick === "function" ) {
You can’t perform that action at this time.
0 commit comments