Skip to content

Commit e0ac411

Browse files
committed
perf(cdk-experimental/column-resize): add debounce to column header hover to prevent excessive handler rendering
Fix lint
1 parent 6eed95e commit e0ac411

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cdk-experimental/column-resize/event-dispatcher.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ export class HeaderRowEventDispatcher {
3333
readonly overlayHandleActiveForCell = new Subject<Element | null>();
3434

3535
/** Distinct and shared version of headerCellHovered. */
36-
readonly headerCellHoveredDistinct = this.headerCellHovered.pipe(distinctUntilChanged(), debounceTime(200), share());
36+
readonly headerCellHoveredDistinct = this.headerCellHovered.pipe(
37+
distinctUntilChanged(),
38+
debounceTime(200),
39+
share(),
40+
);
3741

3842
/**
3943
* Emits the header that is currently hovered or hosting an active resize event (with active

0 commit comments

Comments
 (0)