Skip to content

Commit

Permalink
fix: list scroll when it should not
Browse files Browse the repository at this point in the history
  • Loading branch information
pbullhove committed Feb 6, 2024
1 parent a524237 commit ae5fc34
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions packages/dm-core-plugins/src/list/ListPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ export const ListPlugin = (props: IUIPlugin & { config?: TListConfig }) => {
style={{
width: config?.width || '100%',
height: '100%',
display: 'flex',
overflow: 'scroll',
overflow: 'auto',
}}
>
{attribute && !attribute.contained && (
Expand Down Expand Up @@ -201,7 +200,7 @@ export const ListPlugin = (props: IUIPlugin & { config?: TListConfig }) => {
hideInvalidTypes={internalConfig.hideInvalidTypes}
/>
)}
<div
<Stack
style={{
width: '100%',
display: 'flex',
Expand All @@ -211,31 +210,18 @@ export const ListPlugin = (props: IUIPlugin & { config?: TListConfig }) => {
>
{currentItems &&
currentItems.map((item: TItem<TGenericObject>, index: number) => (
<Stack
key={item?.key}
style={{ width: '100%', height: 'auto', display: 'flex' }}
>
<Stack key={item?.key}>
<Stack
direction='row'
role='row'
justifyContent='space-between'
alignItems='center'
className={`border-b border-[#ccc]`}
style={{
width: '100%',
height: '100%',
padding: '4px',
}}
>
<Stack
direction='row'
alignItems='center'
style={{
height: '100%',
display: 'flex',
width: '100%',
}}
>
<Stack direction='row' alignItems='center'>
{internalConfig.functionality.expand && (
<EdsProvider
density={
Expand Down Expand Up @@ -388,7 +374,7 @@ export const ListPlugin = (props: IUIPlugin & { config?: TListConfig }) => {
</LazyLoad>
</Stack>
))}
</div>
</Stack>
<EdsProvider density={internalConfig.compact ? 'compact' : 'comfortable'}>
<div
className={`w-full space-x-1 flex flex-wrap my-2 justify-between overflow-scroll`}
Expand Down

0 comments on commit ae5fc34

Please sign in to comment.