8 examples of 'material ui number input' in JavaScript

Every line of 'material ui number input' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
315@Input() set number(value: boolean) {
316 console.warn('The number input is no longer supported, please remove your usage.');
317}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

14function InputNumber () {
15 Component.call(this)
16
17 this.setValue = this.setValue.bind(this)
18}
17function InputNumber(props: Props) {
18 function handleChange(value) {
19 if (value !== props.answer.value) {
20 props.onChange({
21 ...props.answer,
22 value
23 });
24 }
25 }
26
27 return (
28 <KeyboardAwareScrollView style={styles.container}>
29 <Text style={styles.label}>{props.question.label}</Text>
30 <View style={styles.inputContainer}>
31 <TextInput
32 keyboardType="numeric"
33 autoFocus={false}
34 autoCorrect={false}
35 style={styles.input}
36 autoCapitalize="none"
37 value={props.answer.value}
38 onChangeText={handleChange}
39 placeholder={props.question.defaultValue}
40 underlineColorAndroid="transparent"
41 selectionColor={Theme.colors.color1}
42 placeholderTextColor={Theme.fontColors.light}
43 />
44 </View>
45 </KeyboardAwareScrollView>
46 );
47}
5function NumberInput(_ref) {
6 var label = _ref.label;
7 var value = _ref.value;
8 var onChange = _ref.onChange;
9 var min = _ref.min;
10 var max = _ref.max;
11
12 return React.createElement(
13 'div',
14 null,
15 React.createElement(
16 'label',
17 null,
18 label
19 ),
20 React.createElement('input', {
21 value: value,
22 onChange: onChange,
23 type: 'number',
24 min: min,
25 max: max,
26 step: 1
27 })
28 );
29}
152InputNumber (h, props, vm) {
153 if (props.status === 'preview') return renderValue(h, formatValue(props.props.value))
154
155 return (
156 <this.source.InputNumber {...props}></this.source.InputNumber>
157 )
158}
81set value(v: any) {
82 if (v != this.innerValue) {
83 this.innerValue = v;
84 this.onChangeCallback(v);
85 }
86}
119function renderNumberInput(props, renderer = mount) {
120 return renderer(<Number { ...props } />);
121}
18onInputChange(event) {
19 this.valueChange.emit(event.target.value);
20}

Related snippets