Skip to content

Commit

Permalink
GH-18 read-only true
Browse files Browse the repository at this point in the history
  • Loading branch information
Artkrygin committed Oct 12, 2021
1 parent d9e63a7 commit f15e13a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controls/AntdImageControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { withStoreToControlProps } from '../util/ContextToProps';

export const AntdImageControl = (props: any): JSX.Element => {
const { uiOptions, data } = props;
return <Image width={'100%'} src={Array.isArray(data) ? data[0] || '' : ''} fallback={uiOptions.fallback} />;
return <Image height={'100%'} src={Array.isArray(data) ? data[0] || '' : ''} fallback={uiOptions.fallback} />;
};

export const antdImageControlTester: RankedTester = rankWith(3, uiTypeIs('aldkg:Image'));
Expand Down
4 changes: 3 additions & 1 deletion src/layouts/AntdFormLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ export const AntdFormLayout: React.FC<any> = ({
return (
<AutoSizer>
{({ width, height }: any) => (
<div style={{ width, height, overflow: 'auto', position: 'relative', ...style }} onClick={() => onEdit()}>
<div
style={{ width, height, overflow: 'auto', position: 'relative', ...style }}
onClick={() => !readOnly && onEdit()}>
{title && <span style={{ padding: '7px', fontSize: '2em' }}>{title}</span>}
{readOnly ? null : <LogicalButton form={id} onSave={onSave} onCancel={onCancel} />}
<Form labelAlign={'left'}>
Expand Down

0 comments on commit f15e13a

Please sign in to comment.