Skip to content

Commit

Permalink
Addressed code review comments (#2222)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Sep 18, 2024
1 parent 288d2bc commit f969947
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions packages/components/src/BulkActionBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import type { StyleProps } from '@react-types/shared';
import type { ItemElement, StyleProps } from '@react-types/shared';
import { ActionBar } from './spectrum';
import commonStyles from './SpectrumComponent.module.scss';

// The action bar will still show the item count + a clear selection button
// even if there are no actions. Our only consumer is currently the ACL Editor,
// but group action functionality has not yet been prioritized (see DH-15221).
// For now we'll just pass it an empty action items array.
const noActions: ItemElement<unknown>[] = [];

export interface BulkActionBarProps {
styleProps?: StyleProps;
selectedItemCount: 'all' | number;
Expand All @@ -22,7 +28,7 @@ export function BulkActionBar({
selectedItemCount={selectedItemCount}
onClearSelection={onClearSelection}
>
<span />
{noActions}
</ActionBar>
);
}
Expand Down
1 change: 0 additions & 1 deletion packages/log/src/LogProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export class LogProxy {
type: LOG_PROXY_TYPE,
listener: (event: CustomEvent<unknown[]>) => void
): void {
// The cast as EventListener is a dumb TypeScript issue
this.eventTarget.addEventListener(
type,
listener as Parameters<EventTarget['addEventListener']>[1]
Expand Down

0 comments on commit f969947

Please sign in to comment.