Commit 5872244b authored by zhangwenshuai's avatar zhangwenshuai

update

parent 6c94a073
...@@ -80,6 +80,7 @@ export const SetFormatter = { ...@@ -80,6 +80,7 @@ export const SetFormatter = {
return SetFormatter.SEARCH(val); return SetFormatter.SEARCH(val);
}, },
RATE: (val) => { RATE: (val) => {
if (!isNumber(val)) return emptyModel;
return [{ value: val, text: val }]; return [{ value: val, text: val }];
}, },
NUMBER: (val, config) => { NUMBER: (val, config) => {
......
...@@ -6,7 +6,7 @@ import { ApolloRateProps } from '../editInterface'; ...@@ -6,7 +6,7 @@ import { ApolloRateProps } from '../editInterface';
import { onBlurFn } from '../onBlurFn'; import { onBlurFn } from '../onBlurFn';
export const ApolloRate = (props: ApolloRateProps) => { export const ApolloRate = (props: ApolloRateProps) => {
const { onChange } = props; const { onChange, columnConfig } = props;
const selfProps = antiAssign(props, [ const selfProps = antiAssign(props, [
'columnConfig', 'columnConfig',
'onChange', 'onChange',
...@@ -26,6 +26,9 @@ export const ApolloRate = (props: ApolloRateProps) => { ...@@ -26,6 +26,9 @@ export const ApolloRate = (props: ApolloRateProps) => {
onChange(value); onChange(value);
} }
}; };
if (columnConfig.requiredFlag) {
selfProps.allowClear = false;
}
return ( return (
<Rate <Rate
className={s.rate} className={s.rate}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment