Commit 719b98c
committed
fix(react): dropdown audit fixes — locked-row hover cancel, stale focus-key reset
Ports Solid's f93f9a3/ea1e0dd audit fixes to React, plus one React-specific
fix surfaced while porting:
- Sort dropdown's non-draggable "Group order" rows now cancel the hover
background (a cue that dragging would do something there, which it
wouldn't — the row's own section heading + hint text already explain
why) while keeping the focus background, since the row is still
clickable/keyboard-toggleable. ddRowHighlighted/ddRowHoverFocusHandlers
both gained a hoverable option for this.
- Filter dropdown's Escape-clear-search-term bug (checked only the
currently active column, not where focus actually was) doesn't apply to
React's architecture: its value-search Escape handler is already bound
directly to that exact input's own onKeyDown, so it can only ever fire
while that specific input has focus. No fix needed there.
- React-specific: closing a dropdown panel (it unmounts entirely) doesn't
reliably fire a blur event on whatever row was focused inside it,
leaving a stale hoveredDdRowKey/focusedDdRowKey that could wrongly match
a same-keyed row in a different dropdown opened right after (e.g.
grouping a column then immediately opening Sort, whose "Group order"
row shares that key). Fixed by resetting both keys whenever which
dropdown is open changes, via the render-time "adjust state when a prop
changes" pattern already used elsewhere in this file (not an effect, to
avoid the react-hooks/set-state-in-effect lint error).1 parent 58d3c17 commit 719b98c
2 files changed
Lines changed: 53 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
903 | | - | |
904 | | - | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
905 | 918 | | |
906 | | - | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
907 | 927 | | |
908 | | - | |
909 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
910 | 934 | | |
911 | 935 | | |
912 | 936 | | |
| |||
2145 | 2169 | | |
2146 | 2170 | | |
2147 | 2171 | | |
2148 | | - | |
| 2172 | + | |
2149 | 2173 | | |
2150 | 2174 | | |
2151 | 2175 | | |
2152 | | - | |
| 2176 | + | |
2153 | 2177 | | |
2154 | 2178 | | |
2155 | 2179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
580 | 602 | | |
581 | 603 | | |
582 | 604 | | |
| |||
0 commit comments