Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPIKE: Add custom HTML to table cell #2488

Open
enowak1031 opened this issue Apr 29, 2024 · 2 comments
Open

SPIKE: Add custom HTML to table cell #2488

enowak1031 opened this issue Apr 29, 2024 · 2 comments
Assignees
Labels
5 5 story points modus-table Modus Table component development

Comments

@enowak1031
Copy link

enowak1031 commented Apr 29, 2024

Related to #1923

@coliff coliff added the modus-table Modus Table component development label Apr 30, 2024
@cjwinsor
Copy link
Contributor

cjwinsor commented May 3, 2024

https://tanstack.com/table/latest/docs/guide/column-defs#column-formatting--rendering

Purpose of this spike is to determine what options we have to support custom cell rendering. Can we give our users a prop that they provide the function to render? If you build the library in react and angular, does it still work? Once we determine the solution, we can create a new issue to implement into MWC.

@cjwinsor cjwinsor added the 5 5 story points label May 9, 2024
@ElishaSamPeterPrabhu ElishaSamPeterPrabhu self-assigned this May 14, 2024
@ElishaSamPeterPrabhu
Copy link
Collaborator

Tanstack API list consists of this flexRender which renders cell content
https://tanstack.com/table/v8/docs/api/core/cell
Status (so far): Unable to the api in our imported "table-core" , it is specfically available in "react-table"

We can do something similar to table-cell-formatter.tsx to flexRenderer
where the code is taken from - https://github.com/TanStack/table/blob/main/packages/react-table/src/index.tsx
FlexRenderer code available in - https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render.ts

or we can stick to the current InnerHtml approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 5 story points modus-table Modus Table component development
Projects
Status: In Progress
Development

No branches or pull requests

4 participants