mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 04:27:04 +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",
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"npmClientArgs": [
|
||||
"--ignore-engines"
|
||||
],
|
||||
"npmClientArgs": ["--ignore-engines"],
|
||||
"command": {
|
||||
"version": {
|
||||
"forcePublish": true,
|
||||
|
@ -164,7 +164,7 @@ const useTableColumns = (props: { showDel?: any; isSubTable?: boolean }, paginat
|
||||
return columns;
|
||||
}
|
||||
const res = [
|
||||
...columns,
|
||||
...adjustColumnOrder(columns),
|
||||
{
|
||||
title: render(),
|
||||
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]);
|
||||
|
||||
return tableColumns;
|
||||
|
@ -65,7 +65,16 @@ const useTableColumns = () => {
|
||||
{/* fix https://nocobase.height.app/T-3232/description */}
|
||||
{/* 如果作为关系表格区块,则 parentRecordData 应该有值;如果作为普通表格使用(如数据源管理页面的表格)则应该使用 recordData,且 parentRecordData 为空 */}
|
||||
<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>
|
||||
</RecordIndexProvider>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user