Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Data Grid › Grid with React and JSX
Tagged: jsx, react, typescript
- This topic has 3 replies, 2 voices, and was last updated 3 years, 6 months ago by
admin.
-
AuthorPosts
-
May 5, 2022 at 11:21 pm #103139
bilal.yasin.whitesand
ParticipantHi there
We are trying smart-grid with React and so far we are loving the functionality that it provides. But we have few questions before we can make a decision to use it as base grid component.
Question 1: When I am trying to use a custom template to render some html inside a cell I want to use JSX. I tried following example with JSX and it didn’t work.
https://www.htmlelements.com/react/demos/grid/column-dynamic-template-with-components/
Can you give me a way to use JSX.Question 2: We have strict typescript type checks in our project so we can’t use type
any. But on a lot of occasions attributes doesn’t have defined types any suggestion here ?
https://ibb.co/251LVh7Question 3: We want to have a column with checkboxes and have a functionality to select a bunch of those and press space to toggle them what’s the best way to achieve this ?
https://ibb.co/MNJgqYT-
This topic was modified 3 years, 6 months ago by
bilal.yasin.whitesand.
May 6, 2022 at 7:04 am #103141admin
KeymasterHi,
Regarding your questions:
1. JSX cannot be used as column template. The column template expects HTML String to be set to formatObject’s template property.
2. The column’s template property is indeed ‘any’ by design, because it could be multiple different things like ‘string’, ‘id’, ‘HTMLTemplateElement’ or function.
3. This is a missing functionality. We will create a work item for implementing it.Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/May 6, 2022 at 7:26 am #103143bilal.yasin.whitesand
ParticipantHey Peter
Thanks for responding.
- Bit disappointed to see JSX not supported :/
- Got it but its not very helpful for strict typescript environments
- I think Grid API is quite flexible will try to implement it myself. Just wanted to check if the team might have some good way to do it.
May 6, 2022 at 1:29 pm #103149admin
KeymasterHi,
The feature with toggling the checkboxes will be available in the next version of the Grid component. We will have a patch release the last week of this month.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/ -
This topic was modified 3 years, 6 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.