Skip to content

Commit fe35b60

Browse files
committed
perf(material): reduce resolutions
1 parent fd91895 commit fe35b60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/material/src/Select/SelectInput.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ const SelectInput = $.defineComponent(function SelectInput(props) {
401401
prevProps: PropsOf<MenuItemTypeMap>
402402
) => {
403403
let newValue: any;
404-
const child = { props: itemProps };
404+
const childValue = itemProps.value;
405405

406406
const multiple = props.multiple;
407407
// We use the tabindex attribute to signal the available options.
@@ -411,14 +411,14 @@ const SelectInput = $.defineComponent(function SelectInput(props) {
411411

412412
if (multiple) {
413413
newValue = Array.isArray(value()) ? value().slice() : [];
414-
const itemIndex = value().indexOf(child.props.value);
414+
const itemIndex = value().indexOf(childValue);
415415
if (itemIndex === -1) {
416-
newValue.push(child.props.value);
416+
newValue.push(childValue);
417417
} else {
418418
newValue.splice(itemIndex, 1);
419419
}
420420
} else {
421-
newValue = child.props.value;
421+
newValue = childValue;
422422
}
423423

424424
if (typeof prevProps.onClick === "function") {

0 commit comments

Comments
 (0)