Added dropdown-cell support for the data editor#6139
Added dropdown-cell support for the data editor#6139IEC1 wants to merge 3 commits intoreflex-dev:mainfrom
Conversation
Greptile SummaryThis PR adds dropdown cell support to the DataEditor component by integrating
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["DataEditor Component\n(dataeditor.py)"] -->|"adds lib_dependency"| B["@glideapps/glide-data-grid-cells"]
A -->|"add_custom_code()"| C["import * as AllCells\nconst allCells = filter(isMatch)"]
C -->|"customRenderers prop"| D["DataEditor React Component"]
E["formatCell(value, column)\n(dataeditor.js)"] -->|"column.type"| F{Switch on type}
F -->|"'int'/'float'"| G["GridCellKind.Number\nreadonly: !editable"]
F -->|"'str'/'datetime'"| H["GridCellKind.Text\nreadonly: !editable"]
F -->|"'bool'"| I["GridCellKind.Boolean\nreadonly: !editable"]
F -->|"'dropdown' (NEW)"| J["GridCellKind.Custom\nreadonly: false ⚠️"]
J -->|"data.kind"| K["'dropdown-cell'\nallowedValues from column"]
D -->|"getCellContent callback"| E
Last reviewed commit: ad2a828 |
| # Custom cell renderers | ||
| custom_renderers: Var[Any] = Var(_js_expr="allCells") |
There was a problem hiding this comment.
custom_renderers always loads all cell renderers
This prop is unconditionally set to allCells for every DataEditor instance, which means the full @glideapps/glide-data-grid-cells bundle (including all custom cell types — date picker, star rating, range, etc.) is always imported and registered even when no dropdown columns are used. Consider making this opt-in or conditionally set — for example, only inject the allCells import and set custom_renderers when at least one column has type: "dropdown".
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This PR adds support for dropdown-cell from @glideapps/glide-data-grid-cells for the Data Editor.
All Submissions:
Type of change
New Feature Submission: