From f15e13a9813cd1507f710f6376d4e8c977910500 Mon Sep 17 00:00:00 2001 From: Artkrygin <80037398+Artkrygin@users.noreply.github.com> Date: Tue, 12 Oct 2021 17:29:33 +0300 Subject: [PATCH] GH-18 read-only true --- src/controls/AntdImageControl.tsx | 2 +- src/layouts/AntdFormLayout.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controls/AntdImageControl.tsx b/src/controls/AntdImageControl.tsx index 1a2c531..33c0591 100644 --- a/src/controls/AntdImageControl.tsx +++ b/src/controls/AntdImageControl.tsx @@ -5,7 +5,7 @@ import { withStoreToControlProps } from '../util/ContextToProps'; export const AntdImageControl = (props: any): JSX.Element => { const { uiOptions, data } = props; - return ; + return ; }; export const antdImageControlTester: RankedTester = rankWith(3, uiTypeIs('aldkg:Image')); diff --git a/src/layouts/AntdFormLayout.tsx b/src/layouts/AntdFormLayout.tsx index 0df446c..eebfb0b 100644 --- a/src/layouts/AntdFormLayout.tsx +++ b/src/layouts/AntdFormLayout.tsx @@ -82,7 +82,9 @@ export const AntdFormLayout: React.FC = ({ return ( {({ width, height }: any) => ( - onEdit()}> + !readOnly && onEdit()}> {title && {title}} {readOnly ? null : }