MCPcopy
hub / github.com/react/react / change

Method change

packages/react-dom/src/__tests__/ReactDOMInput-test.js:251–258  ·  view source on GitHub ↗
(newValue)

Source from the content-addressed store, hash-verified

249 b = null;
250 switchedFocus = false;
251 change(newValue) {
252 this.setState({value: newValue});
253 // Calling focus here will blur the text box which causes a native
254 // change event. Ideally we shouldn't have to fire this ourselves.
255 // Don't remove unless you've verified the fix in #8240 is still covered.
256 dispatchEventOnNode(this.a, 'input');
257 this.b.focus();
258 }
259 blur(currentValue) {
260 this.switchedFocus = true;
261 // currentValue should be 'giraffe' here because we should not have

Callers 1

Calls 2

dispatchEventOnNodeFunction · 0.85
focusMethod · 0.65

Tested by

no test coverage detected