diff --git a/admin-web/src/components/Dictionary/DictionarySelect.js b/admin-web/src/components/Dictionary/DictionarySelect.js index 358fbf525..7c4ba54d0 100644 --- a/admin-web/src/components/Dictionary/DictionarySelect.js +++ b/admin-web/src/components/Dictionary/DictionarySelect.js @@ -4,11 +4,15 @@ import DictionaryContext from './DictionaryContext'; export default class DictionarySelect extends PureComponent { renderSelect(children) { - // eslint-disable-next-line react/destructuring-assignment // const { initialValue } = this.props['data-__meta']; - const propsX = this.props; - if (propsX.defaultValue === 'undefined' || propsX.defaultValue === 'null') { - propsX.defaultValue = undefined; + const propsX = { + ...this.props, + }; + if (propsX.value !== undefined || propsX.value !== null) { + propsX.value = `${propsX.value}`; + } + if (propsX.value === 'undefined' || propsX.value === 'null') { + delete propsX.value; } return ; }