Skip to content

Commit cb7745c

Browse files
kartikladnhunzaker
authored andcommitted
remove unused state initialValue from ReactDOMFiberSelect (facebook#13412)
1 parent 9832a1b commit cb7745c

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

packages/react-dom/src/client/ReactDOMFiberSelect.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import warning from 'shared/warning';
1313

1414
import ReactControlledValuePropTypes from '../shared/ReactControlledValuePropTypes';
1515
import {getToStringValue, toString} from './ToStringValue';
16-
import type {ToStringValue} from './ToStringValue';
1716

1817
let didWarnValueDefaultValue;
1918

@@ -23,7 +22,6 @@ if (__DEV__) {
2322

2423
type SelectWithWrapperState = HTMLSelectElement & {
2524
_wrapperState: {
26-
initialValue: ?ToStringValue,
2725
wasMultiple: boolean,
2826
},
2927
};
@@ -148,9 +146,7 @@ export function initWrapperState(element: Element, props: Object) {
148146
checkSelectPropTypes(props);
149147
}
150148

151-
const value = props.value;
152149
node._wrapperState = {
153-
initialValue: value != null ? value : props.defaultValue,
154150
wasMultiple: !!props.multiple,
155151
};
156152

@@ -186,10 +182,6 @@ export function postMountWrapper(element: Element, props: Object) {
186182

187183
export function postUpdateWrapper(element: Element, props: Object) {
188184
const node = ((element: any): SelectWithWrapperState);
189-
// After the initial mount, we control selected-ness manually so don't pass
190-
// this value down
191-
node._wrapperState.initialValue = undefined;
192-
193185
const wasMultiple = node._wrapperState.wasMultiple;
194186
node._wrapperState.wasMultiple = !!props.multiple;
195187

0 commit comments

Comments
 (0)