mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(plugin-object-viewer): CB-1029 metadata editor table stretch
This commit is contained in:
+1
-8
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { useDatabaseObjectInfo } from '@cloudbeaver/core-app';
|
||||
import { TableHeader, TableBody, Table } from '@cloudbeaver/core-blocks';
|
||||
@@ -19,19 +18,13 @@ interface ObjectChildrenPropertyTableProps {
|
||||
nodeIds: string[];
|
||||
}
|
||||
|
||||
const styles = css`
|
||||
Table {
|
||||
flex: auto;
|
||||
}
|
||||
`;
|
||||
|
||||
export const ObjectChildrenPropertyTable = observer(function ObjectPropertyTable({
|
||||
nodeIds,
|
||||
}: ObjectChildrenPropertyTableProps) {
|
||||
const firstChild = nodeIds[0] || '';
|
||||
const properties = useDatabaseObjectInfo(firstChild).dbObject?.properties;
|
||||
|
||||
return styled(styles)(
|
||||
return (
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<Header properties={properties || []} />
|
||||
|
||||
+13
-1
@@ -7,14 +7,22 @@
|
||||
*/
|
||||
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import styled from 'reshadow';
|
||||
|
||||
import { useChildren } from '@cloudbeaver/core-app';
|
||||
import { Loader, TextPlaceholder } from '@cloudbeaver/core-blocks';
|
||||
import { useTranslate } from '@cloudbeaver/core-localization';
|
||||
import { css } from '@reshadow/react';
|
||||
|
||||
import { useObjectFolder } from '../../useObjectFolder';
|
||||
import { ObjectChildrenPropertyTable } from './ObjectChildrenPropertyTable';
|
||||
|
||||
const styles = css`
|
||||
div {
|
||||
flex: auto;
|
||||
}
|
||||
`;
|
||||
|
||||
interface ObjectPropertyTableProps {
|
||||
objectId: string;
|
||||
parentId: string;
|
||||
@@ -36,7 +44,11 @@ export const ObjectPropertyTable = observer(function ObjectPropertyTable({
|
||||
return <TextPlaceholder>{translate('plugin_object_viewer_table_no_items')}</TextPlaceholder>;
|
||||
}
|
||||
|
||||
return <ObjectChildrenPropertyTable nodeIds={children.children} />;
|
||||
return styled(styles)(
|
||||
<div>
|
||||
<ObjectChildrenPropertyTable nodeIds={children.children} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export const objectPropertyTablePanel = (parentId: string, objectId: string) => (
|
||||
|
||||
Reference in New Issue
Block a user