mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 12:08:13 +08:00
fix input-rating allowClear bug (#2437)
This commit is contained in:
parent
0697a99062
commit
e359017ed3
@ -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)}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user