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",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": [
"--ignore-engines"
],
"npmClientArgs": ["--ignore-engines"],
"command": {
"version": {
"forcePublish": true,

View File

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