mirror of
https://github.com/IT4Change/ohmyform-ui.git
synced 2025-12-13 09:45:50 +00:00
fix rating field default value
This commit is contained in:
parent
44f1d14d8d
commit
e7b5fc50b4
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- yes / no field fixed on admin and user view
|
||||
- prev property error on div
|
||||
- rating field default on admin
|
||||
|
||||
### Security
|
||||
|
||||
|
||||
@ -14,6 +14,8 @@ export const RatingType: React.FC<AdminFieldTypeProps> = (props) => {
|
||||
name={[props.field.name as string, 'value']}
|
||||
labelCol={{ span: 6 }}
|
||||
extra={t('type:rating.clearNote')}
|
||||
getValueFromEvent={(value: number) => (value !== undefined ? value.toFixed(1) : undefined)}
|
||||
getValueProps={(value: string) => ({ value: parseFloat(value) })}
|
||||
>
|
||||
<Rate allowHalf allowClear />
|
||||
</Form.Item>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user