Repository navigation
Commit ae6a363
authored
improvement(ux): submit on Enter in chip modals and advance table rows (#5781)
* improvement(ux): submit on Enter in chip modals and advance table rows
* fix(emcn): stop Enter double-submit and close registration gap
- stopPropagation on field Enter-submit so a parent onKeyDown can't re-fire the primary (double OAuth connect, etc.)
- register primary via useLayoutEffect so it's set before paint (no null-Enter window)
- drop now-redundant parent Enter handlers in connect-oauth/create-workspace/rename-document modals
* fix(table): suppress auto-opened tag dropdown when Enter advances cells
Focusing an empty cell auto-opens the tag dropdown; without closing it a follow-up Enter inserts a tag instead of navigating down the column.
* fix(table): clean up cell refs on unmount and guard Enter advance
- delete inputRefs/overlayRefs entries when a cell detaches so deleting a row can't leave stale position-keyed entries
- guard Enter advance with isConnected so a stale ref can never steal focus into a detached node1 parent a1ea3bd commit ae6a363
6 files changed
Lines changed: 160 additions & 69 deletions
File tree
- apps/sim/app/workspace/[workspaceId]
- components/connect-oauth-modal
- knowledge/[id]/components/rename-document-modal
- scheduled-tasks/components/task-modal
- w
- [workflowId]/components/panel/components/editor/components/sub-block/components/table
- components/sidebar/components/workspace-header/components/create-workspace-modal
- packages/emcn/src/components/chip-modal
Lines changed: 2 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | 312 | | |
325 | 313 | | |
326 | 314 | | |
| |||
334 | 322 | | |
335 | 323 | | |
336 | 324 | | |
337 | | - | |
| 325 | + | |
338 | 326 | | |
339 | 327 | | |
340 | 328 | | |
| |||
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 77 | | |
85 | 78 | | |
86 | 79 | | |
87 | | - | |
| 80 | + | |
88 | 81 | | |
89 | 82 | | |
90 | 83 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
Lines changed: 38 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
100 | 135 | | |
101 | 136 | | |
102 | 137 | | |
| |||
138 | 173 | | |
139 | 174 | | |
140 | 175 | | |
| 176 | + | |
141 | 177 | | |
142 | 178 | | |
143 | 179 | | |
144 | 180 | | |
145 | 181 | | |
146 | | - | |
| 182 | + | |
147 | 183 | | |
148 | 184 | | |
149 | 185 | | |
| |||
158 | 194 | | |
159 | 195 | | |
160 | 196 | | |
| 197 | + | |
161 | 198 | | |
162 | 199 | | |
163 | 200 | | |
| |||
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 72 | | |
80 | 73 | | |
81 | 74 | | |
| |||
86 | 79 | | |
87 | 80 | | |
88 | 81 | | |
89 | | - | |
| 82 | + | |
90 | 83 | | |
91 | 84 | | |
92 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
89 | 109 | | |
90 | 110 | | |
91 | 111 | | |
| |||
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
| 143 | + | |
123 | 144 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
134 | 157 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
138 | 161 | | |
139 | 162 | | |
140 | 163 | | |
| |||
364 | 387 | | |
365 | 388 | | |
366 | 389 | | |
367 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
368 | 416 | | |
369 | 417 | | |
370 | 418 | | |
| |||
380 | 428 | | |
381 | 429 | | |
382 | 430 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | 431 | | |
389 | 432 | | |
390 | | - | |
| 433 | + | |
391 | 434 | | |
392 | 435 | | |
393 | 436 | | |
394 | 437 | | |
395 | 438 | | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | 439 | | |
402 | 440 | | |
403 | 441 | | |
| |||
536 | 574 | | |
537 | 575 | | |
538 | 576 | | |
| 577 | + | |
539 | 578 | | |
540 | 579 | | |
541 | 580 | | |
| |||
559 | 598 | | |
560 | 599 | | |
561 | 600 | | |
562 | | - | |
| 601 | + | |
563 | 602 | | |
564 | 603 | | |
565 | 604 | | |
| |||
584 | 623 | | |
585 | 624 | | |
586 | 625 | | |
587 | | - | |
| 626 | + | |
| 627 | + | |
588 | 628 | | |
589 | 629 | | |
590 | 630 | | |
| |||
594 | 634 | | |
595 | 635 | | |
596 | 636 | | |
597 | | - | |
| 637 | + | |
| 638 | + | |
598 | 639 | | |
599 | 640 | | |
600 | 641 | | |
601 | 642 | | |
602 | 643 | | |
603 | 644 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
614 | 663 | | |
615 | 664 | | |
616 | 665 | | |
| |||
619 | 668 | | |
620 | 669 | | |
621 | 670 | | |
| 671 | + | |
622 | 672 | | |
623 | 673 | | |
624 | 674 | | |
| |||
1043 | 1093 | | |
1044 | 1094 | | |
1045 | 1095 | | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
1046 | 1125 | | |
1047 | 1126 | | |
1048 | 1127 | | |
| |||
0 commit comments