refactor: set field required in sub-table should display required indicator in column header (#4972)

* refactor: set field required in sub-table should  display required indicator in column header

* fix: test

* refactor: code improve

* fix: test
This commit is contained in:
Katherine 2024-08-02 17:21:14 +08:00 committed by GitHub
parent 638b17dee1
commit 176f3269ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 17 deletions

View File

@ -2,9 +2,7 @@
"version": "1.2.28-alpha", "version": "1.2.28-alpha",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"npmClientArgs": [ "npmClientArgs": ["--ignore-engines"],
"--ignore-engines"
],
"command": { "command": {
"version": { "version": {
"forcePublish": true, "forcePublish": true,

View File

@ -66,20 +66,10 @@ export const TableColumnDecorator = (props) => {
> >
<CollectionFieldContext.Provider value={collectionField}> <CollectionFieldContext.Provider value={collectionField}>
<Designer fieldSchema={fieldSchema} uiSchema={uiSchema} collectionField={collectionField} /> <Designer fieldSchema={fieldSchema} uiSchema={uiSchema} collectionField={collectionField} />
{/* <RecursionField name={columnSchema.name} schema={columnSchema}/> */} <span role="button">
<div role="button">{field?.title || compile(uiSchema?.title)}</div> {fieldSchema?.required && <span className="ant-formily-item-asterisk">*</span>}
{/* <div <span>{field?.title || compile(uiSchema?.title)}</span>
onClick={() => { </span>
field.title = uid();
// columnSchema.title = field.title = field.title;
// refresh();
// field.query(`.*.${fieldSchema.name}`).take((f) => {
// f.componentProps.dateFormat = 'YYYY-MM-DD';
// });
}}
>
Edit
</div> */}
</CollectionFieldContext.Provider> </CollectionFieldContext.Provider>
</SortableItem> </SortableItem>
); );