-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to use the cell formatter to return a Svelte component? #2
Comments
"Grid.js uses Preact to render the elements and that means that you can take advantage of Preact's Virtual DOM and render complex cells." And Svelte approach is using the compiler and uses real DOM, instead of using virtual DOM. So I think, you can't use Svelte component to handle this. |
Hey, thanks for the reply! html Works fine if you just want to return the cell itself, but not a svelte component. There must be a way to create a Svelte component on fly, pass the props and then return the built html. I'll try to play around with it, thanks so far! 👍 |
+1. Would be great to be able to use a Svelte component so that changes to the site theme are automatically reflected in gridjs instances. |
I would like to use svelte components with gridjs so that I can use bootstrap icons with my data. It would be very useful to use something like html from gridjs to do it. |
Hey there! On v2 I already added plugins to wrapping the svelte component, so now we can to svelte component to render the cell. Check out the example. Note: (currently!) when we use plugin we not receive the data, I don't why but I think it's might bug on Grid.js |
Basically something like https://gridjs.io/docs/examples/react-cells
Thanks! :)
The text was updated successfully, but these errors were encountered: