MCPcopy Create free account
hub / github.com/Lobos/react-ui / setInput

Function setInput

src/Pagination.js:34–51  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

32 }
33
34 setInput (event) {
35 event.preventDefault();
36
37 let value = this.refs.input.value;
38 value = parseInt(value);
39 if (isNaN(value)) {
40 return;
41 }
42 if (value < 1) {
43 this.handleChange(1);
44 return;
45 }
46
47 this.setIndex(value);
48 if (this.props.onChange) {
49 this.props.onChange(value);
50 }
51 }
52
53 handleChange (index) {
54 this.setIndex(index);

Callers

nothing calls this directly

Calls 2

onChangeMethod · 0.80
handleChangeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…