mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:06:31 +00:00
fix(audit-logs): Add ellipsis feature to table columns (#1603)
* fix: text is so long * feat: don't need rowSelection
This commit is contained in:
parent
e5ee716702
commit
92d0eab0cc
@ -1,4 +1,4 @@
|
|||||||
import { useCompile } from '@nocobase/client';
|
import { EllipsisWithTooltip, useCompile } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { observer, useField } from '@formily/react';
|
import { observer, useField } from '@formily/react';
|
||||||
|
|
||||||
@ -8,5 +8,9 @@ export const AuditLogsField = observer(() => {
|
|||||||
if (!field.value) {
|
if (!field.value) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return <div>{field.value?.uiSchema?.title ? compile(field.value?.uiSchema?.title) : field.value.name}</div>;
|
return (
|
||||||
|
<EllipsisWithTooltip ellipsis>
|
||||||
|
{field.value?.uiSchema?.title ? compile(field.value?.uiSchema?.title) : field.value.name}
|
||||||
|
</EllipsisWithTooltip>
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormProvider, SchemaComponent, useRecord } from '@nocobase/client';
|
import { EllipsisWithTooltip, FormProvider, SchemaComponent, useRecord } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { observer, useField } from '@formily/react';
|
import { observer, useField } from '@formily/react';
|
||||||
|
|
||||||
@ -19,5 +19,5 @@ export const AuditLogsValue = observer(() => {
|
|||||||
</FormProvider>
|
</FormProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return <div>{field.value ? JSON.stringify(field.value) : null}</div>;
|
return <EllipsisWithTooltip ellipsis>{field.value ? JSON.stringify(field.value) : null}</EllipsisWithTooltip>;
|
||||||
});
|
});
|
||||||
|
@ -255,9 +255,7 @@ export const AuditLogsViewActionInitializer = (props) => {
|
|||||||
type: 'array',
|
type: 'array',
|
||||||
'x-component': 'TableV2',
|
'x-component': 'TableV2',
|
||||||
'x-component-props': {
|
'x-component-props': {
|
||||||
rowSelection: {
|
rowSelection: false,
|
||||||
type: 'checkbox',
|
|
||||||
},
|
|
||||||
useProps: '{{ useTableFieldProps }}',
|
useProps: '{{ useTableFieldProps }}',
|
||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
|
Loading…
Reference in New Issue
Block a user