feature: Add listener input event for instance-volume component
1.If the min attribute is set, the onchange event will not be triggered when the value is lower than min size 2.This is not conducive to our validation of input values, which leads to some unknown bugs Change-Id: Id1ad89fce61681a6e4e96b02ff1a3c804a60ab35
This commit is contained in:
parent
124fdc3c2a
commit
f384bd4b73
@ -13,9 +13,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Select, Checkbox, Row, Col, Form } from 'antd';
|
import { Select, Checkbox, Row, Col, Form, InputNumber } from 'antd';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import InputInt from '../InputInt';
|
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
export default class InstanceVolume extends React.Component {
|
export default class InstanceVolume extends React.Component {
|
||||||
@ -152,11 +151,14 @@ export default class InstanceVolume extends React.Component {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
const input = (
|
const input = (
|
||||||
<InputInt
|
<InputNumber
|
||||||
value={size}
|
value={size}
|
||||||
onChange={this.onInputChange}
|
onChange={this.onInputChange}
|
||||||
min={minSize}
|
min={minSize}
|
||||||
style={{ maxWidth: '60%' }}
|
style={{ maxWidth: '60%' }}
|
||||||
|
precision={0}
|
||||||
|
formatter={(value) => `$ ${value}`.replace(/\D/g, '')}
|
||||||
|
onInput={(e) => this.onInputChange(e * 1)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
const deleteValue = deleteType === 1;
|
const deleteValue = deleteType === 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user