Skip to content

Commit

Permalink
fix: Fixed ListView props (#1986)
Browse files Browse the repository at this point in the history
Wired up ListView props I missed on refactor.
  • Loading branch information
bmingles authored May 3, 2024
1 parent a283e13 commit 0ca3a66
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/components/src/spectrum/listView/ListView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useMemo } from 'react';
import { SpectrumListViewProps } from '@adobe/react-spectrum';
import cl from 'classnames';
import { EMPTY_FUNCTION } from '@deephaven/utils';
import {
ItemKey,
Expand All @@ -9,7 +10,7 @@ import {
TooltipOptions,
wrapItemChildren,
} from '../utils';
import { ListViewWrapper } from './ListViewWrapper';
import { ListViewWrapper, ListViewWrapperProps } from './ListViewWrapper';
import { ItemElementOrPrimitive } from '../shared';

export type ListViewProps = {
Expand Down Expand Up @@ -71,8 +72,18 @@ export function ListView({
<ListViewWrapper
// eslint-disable-next-line react/jsx-props-no-spreading
{...spectrumListViewProps}
UNSAFE_className="dh-list-view"
UNSAFE_className={cl('dh-list-view', UNSAFE_className)}
selectedKeys={
selectedKeys as ListViewWrapperProps<unknown>['selectedKeys']
}
defaultSelectedKeys={
defaultSelectedKeys as ListViewWrapperProps<unknown>['defaultSelectedKeys']
}
disabledKeys={
disabledKeys as ListViewWrapperProps<unknown>['disabledKeys']
}
onScroll={onScroll}
onSelectionChange={onChange ?? onSelectionChange}
>
{wrappedItems}
</ListViewWrapper>
Expand Down

0 comments on commit 0ca3a66

Please sign in to comment.