diff --git a/src/Form.css b/src/Form.css deleted file mode 100644 index 92c6611..0000000 --- a/src/Form.css +++ /dev/null @@ -1,3 +0,0 @@ -.ant-input-disabled { - border: none; -} diff --git a/src/Form.tsx b/src/Form.tsx index 5ae4c6b..004d469 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -22,7 +22,6 @@ import { UnknownRenderer } from './UnknownRenderer'; import { RankedTester } from './testers'; import { IViewDescr, IViewDescrElement, IViewKind, IViewKindElement } from './models/uischema'; import { JsObject } from '@agentlab/sparql-jsld-client'; -import './Form.css'; export interface ControlComponent { data: any; diff --git a/src/layouts/AntdFormLayout.tsx b/src/layouts/AntdFormLayout.tsx index 3fedf46..9e61ec0 100644 --- a/src/layouts/AntdFormLayout.tsx +++ b/src/layouts/AntdFormLayout.tsx @@ -82,7 +82,7 @@ export const AntdFormLayout: React.FC = ({ return ( {({ width, height }: any) => ( -
onEdit()}> +
onEdit()}> {title} {readOnly ? null : }
diff --git a/src/layouts/AntdHorizontalLayout.tsx b/src/layouts/AntdHorizontalLayout.tsx index c50d11c..3bb143b 100644 --- a/src/layouts/AntdHorizontalLayout.tsx +++ b/src/layouts/AntdHorizontalLayout.tsx @@ -25,18 +25,17 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ viewDescrElement, enabled, visible, + form, }) => { //const layout = viewKindElement as Layout; const parentViewKindElement = viewKindElement; - const Render: React.FC = ({ idx, viewKind, viewKindElement, viewDescr, enabled, form }) => { + const Render: React.FC = ({ idx, viewKind, viewKindElement, viewDescr, enabled }) => { const options = viewKindElement.options || {}; + const numberOfColumns = Math.ceil(24 / (parentViewKindElement.elements?.length || 1)); const style: any = options.style; - const span = - options.contentSize || !parentViewKindElement.elements - ? undefined - : Math.ceil(24 / parentViewKindElement.elements.length); + const span = options.contentSize || numberOfColumns; return ( - + = ({ ); }; - const justify: any = viewKindElement.options?.justify || 'center'; + const justify: any = viewKindElement.options?.justify || 'space-between'; const align: any = viewKindElement.options?.align || 'middle'; const rowStyle: any = { flexWrap: 'nowrap' }; if (viewKindElement.options && viewKindElement.options.width === 'all-empty-space') rowStyle.width = '100%'; diff --git a/src/layouts/AntdVerticalLayout.tsx b/src/layouts/AntdVerticalLayout.tsx index 5307afb..174d2db 100644 --- a/src/layouts/AntdVerticalLayout.tsx +++ b/src/layouts/AntdVerticalLayout.tsx @@ -42,7 +42,7 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ width: '100%', //flex: viewKindElement.options && viewKindElement.options.height === 'all-empty-space' ? '1 1 auto' : '', }}> - +