fix: record picker display incorrect data when field has default value in collection (#3266)
* fix: default value should not set when field is readpretty or readonly * fix: record picker display incorrect data when field has default value in collection
This commit is contained in:
parent
641ca2dcca
commit
76e95729e4
@ -256,6 +256,7 @@ export const useTableSelectorProps = () => {
|
||||
useEffect(() => {
|
||||
if (!ctx?.service?.loading) {
|
||||
field.value = ctx?.service?.data?.data;
|
||||
field?.setInitialValue?.(ctx?.service?.data?.data);
|
||||
field.data = field.data || {};
|
||||
field.data.selectedRowKeys = ctx?.field?.data?.selectedRowKeys;
|
||||
field.componentProps.pagination = field.componentProps.pagination || {};
|
||||
|
@ -49,7 +49,6 @@ const InternalField: React.FC = (props: Props) => {
|
||||
const defaultVal = fieldSchema.default || defaultValue;
|
||||
defaultVal !== null && defaultVal !== undefined && setFieldProps('initialValue', defaultVal);
|
||||
}
|
||||
|
||||
if (!field.validator && (uiSchema['x-validator'] || fieldSchema['x-validator'])) {
|
||||
const concatSchema = concat([], uiSchema['x-validator'] || [], fieldSchema['x-validator'] || []);
|
||||
field.validator = concatSchema;
|
||||
|
Loading…
Reference in New Issue
Block a user