fix input-rating allowClear bug (#2437)

This commit is contained in:
Allen 2021-08-26 11:42:44 +08:00 committed by GitHub
parent 0697a99062
commit e359017ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,11 @@ export interface RatingControlSchema extends FormBaseControl {
* *
*/ */
half?: boolean; half?: boolean;
/**
*
*/
allowClear?: boolean;
} }
export interface RatingProps extends FormControlProps { export interface RatingProps extends FormControlProps {
@ -45,6 +50,7 @@ export default class RatingControl extends React.Component<RatingProps, any> {
disabled, disabled,
onChange, onChange,
size, size,
allowClear,
classnames: cx classnames: cx
} = this.props; } = this.props;
@ -56,6 +62,7 @@ export default class RatingControl extends React.Component<RatingProps, any> {
disabled={disabled} disabled={disabled}
count={count} count={count}
half={half} half={half}
allowClear={allowClear}
readOnly={readOnly} readOnly={readOnly}
onChange={(value: any) => onChange(value)} onChange={(value: any) => onChange(value)}
/> />