Skip to content

Commit

Permalink
Merge pull request #137 from axonivy/detail-scroll
Browse files Browse the repository at this point in the history
make detail scrollable
  • Loading branch information
ivy-lgi authored Jan 17, 2025
2 parents 40f6537 + 28328b4 commit 0493c08
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions packages/dataclass-editor/src/detail/Detail.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.detail-content {
overflow: auto;
}
17 changes: 10 additions & 7 deletions packages/dataclass-editor/src/detail/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useValidation } from '../context/useValidation';
import { messagesByProperty } from '../data/validation-utils';
import { useHotkeyTexts } from '../utils/hotkeys';
import { DataClassDetailContent } from './dataclass/DataClassDetailContent';
import './Detail.css';
import { FieldDetailContent } from './field/FieldDetailContent';

type DetailProps = {
Expand Down Expand Up @@ -38,13 +39,15 @@ export const Detail = ({ title, helpUrl }: DetailProps) => {
<SidebarHeader icon={IvyIcons.PenEdit} title={title} className='detail-header'>
<Button icon={IvyIcons.Help} onClick={() => openUrl(helpUrl)} title={helpText} aria-label={helpText} />
</SidebarHeader>
{!field ? (
<DataClassDetailContent />
) : (
<FieldProvider value={{ field, setField, messages: messagesByProperty(validations) }}>
<FieldDetailContent key={selectedField} />
</FieldProvider>
)}
<Flex direction='column' className='detail-content'>
{!field ? (
<DataClassDetailContent />
) : (
<FieldProvider value={{ field, setField, messages: messagesByProperty(validations) }}>
<FieldDetailContent key={selectedField} />
</FieldProvider>
)}
</Flex>
</Flex>
);
};

0 comments on commit 0493c08

Please sign in to comment.