Commit b1dd61d
FIX: Pivot Columns Dropdown Empty on First Render in "More" Menu (#51)
* fix: resolve empty dropdown issue for Pivot columns in More menu
When the Pivot toolbar item was displayed inside the "More" dropdown (due to toolbar overflow), the columns dropdown appeared empty on first render. This occurred because the memoized dropdownMenu was capturing stale JSX snapshots of components.
Changed from using Ant Design's menu prop to dropdownRender to ensure components are rendered fresh with current state on each dropdown open, rather than relying on cached React element references.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: use custom classes and memoize dropdownRender for More menu
- Replace internal Ant Design class names with custom classes
(no-code-toolbar-more-menu, no-code-toolbar-more-item)
- Memoize dropdownRender with useCallback to avoid unnecessary re-renders
- Add CSS styles for the custom dropdown classes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1da805a commit b1dd61d
File tree
2 files changed
+33
-15
lines changed- frontend/src/ide/editor/no-code-toolbar
2 files changed
+33
-15
lines changedLines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
Lines changed: 18 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | 438 | | |
453 | 439 | | |
454 | 440 | | |
455 | 441 | | |
456 | 442 | | |
457 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
472 | 475 | | |
473 | 476 | | |
474 | 477 | | |
475 | | - | |
| 478 | + | |
476 | 479 | | |
477 | 480 | | |
478 | 481 | | |
| |||
0 commit comments