Commit 5410de1
committed
perf(cdk-experimental/column-resize): add debounce to column header hover to prevent excessive handler rendering
Improve the user experience and performance of the `cdk-experimental` column resize feature by adding a `debounceTime` operator to the `headerCellHoveredDistinct` observable. Previously, the hover event triggered the handler immediately, which could result in unwanted handlers showing up when the user quickly moved their cursor over column headers. This change ensures that the handlers only appear if the user pauses (hovers for 300ms) over the column header, preventing handlers from rendering during fast cursor movements.1 parent ba5cf3d commit 5410de1
File tree
2 files changed
+17
-3
lines changed- src
- cdk-experimental/column-resize
- material-experimental/column-resize
2 files changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
| |||
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| 442 | + | |
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
| |||
451 | 453 | | |
452 | 454 | | |
453 | 455 | | |
| 456 | + | |
454 | 457 | | |
455 | 458 | | |
456 | 459 | | |
| |||
500 | 503 | | |
501 | 504 | | |
502 | 505 | | |
| 506 | + | |
503 | 507 | | |
504 | 508 | | |
505 | 509 | | |
| |||
535 | 539 | | |
536 | 540 | | |
537 | 541 | | |
| 542 | + | |
538 | 543 | | |
539 | 544 | | |
540 | 545 | | |
| |||
552 | 557 | | |
553 | 558 | | |
554 | 559 | | |
| 560 | + | |
555 | 561 | | |
556 | 562 | | |
557 | 563 | | |
| |||
589 | 595 | | |
590 | 596 | | |
591 | 597 | | |
| 598 | + | |
592 | 599 | | |
593 | 600 | | |
594 | 601 | | |
| |||
610 | 617 | | |
611 | 618 | | |
612 | 619 | | |
| 620 | + | |
613 | 621 | | |
614 | 622 | | |
615 | 623 | | |
| |||
674 | 682 | | |
675 | 683 | | |
676 | 684 | | |
| 685 | + | |
677 | 686 | | |
678 | 687 | | |
679 | 688 | | |
| |||
699 | 708 | | |
700 | 709 | | |
701 | 710 | | |
| 711 | + | |
702 | 712 | | |
703 | 713 | | |
704 | 714 | | |
| |||
0 commit comments