mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:55:50 +00:00
fix: table scrollbar issue in non-config mode (#5599)
* fix: unnecessary scrollbar in non-config mode with few columns * fix: bug * refactor: table column
This commit is contained in:
parent
03f5899902
commit
89269ec7a4
@ -2,9 +2,7 @@
|
|||||||
"version": "1.4.0-alpha.2",
|
"version": "1.4.0-alpha.2",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"npmClientArgs": [
|
"npmClientArgs": ["--ignore-engines"],
|
||||||
"--ignore-engines"
|
|
||||||
],
|
|
||||||
"command": {
|
"command": {
|
||||||
"version": {
|
"version": {
|
||||||
"forcePublish": true,
|
"forcePublish": true,
|
||||||
|
@ -164,7 +164,7 @@ const useTableColumns = (props: { showDel?: any; isSubTable?: boolean }, paginat
|
|||||||
return columns;
|
return columns;
|
||||||
}
|
}
|
||||||
const res = [
|
const res = [
|
||||||
...columns,
|
...adjustColumnOrder(columns),
|
||||||
{
|
{
|
||||||
title: render(),
|
title: render(),
|
||||||
dataIndex: 'TABLE_COLUMN_INITIALIZER',
|
dataIndex: 'TABLE_COLUMN_INITIALIZER',
|
||||||
@ -210,7 +210,7 @@ const useTableColumns = (props: { showDel?: any; isSubTable?: boolean }, paginat
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return adjustColumnOrder(res);
|
return res;
|
||||||
}, [columns, exists, field, render, props.showDel, designable]);
|
}, [columns, exists, field, render, props.showDel, designable]);
|
||||||
|
|
||||||
return tableColumns;
|
return tableColumns;
|
||||||
|
@ -65,7 +65,16 @@ const useTableColumns = () => {
|
|||||||
{/* fix https://nocobase.height.app/T-3232/description */}
|
{/* fix https://nocobase.height.app/T-3232/description */}
|
||||||
{/* 如果作为关系表格区块,则 parentRecordData 应该有值;如果作为普通表格使用(如数据源管理页面的表格)则应该使用 recordData,且 parentRecordData 为空 */}
|
{/* 如果作为关系表格区块,则 parentRecordData 应该有值;如果作为普通表格使用(如数据源管理页面的表格)则应该使用 recordData,且 parentRecordData 为空 */}
|
||||||
<RecordProvider record={record} parent={parentRecordData || recordData}>
|
<RecordProvider record={record} parent={parentRecordData || recordData}>
|
||||||
<RecursionField schema={s} name={record.__index || index} onlyRenderProperties />
|
<span
|
||||||
|
role="button"
|
||||||
|
className={css`
|
||||||
|
.ant-space-gap-col-small {
|
||||||
|
column-gap: 10px;
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
>
|
||||||
|
<RecursionField schema={s} name={record.__index || index} onlyRenderProperties />
|
||||||
|
</span>
|
||||||
</RecordProvider>
|
</RecordProvider>
|
||||||
</RecordIndexProvider>
|
</RecordIndexProvider>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user