vaheqelyan / svelte-grid

A responsive, draggable and resizable grid layout, for Svelte.
https://svelte-grid.now.sh/
MIT License
948 stars 57 forks source link

[HELP] Changing Data Dinamicly #112

Closed SekSion closed 2 years ago

SekSion commented 2 years ago

Hello, this isnt an actual issue but it is something i need and im not finding it.

Im rendering chartJS inside a grid, but now i need to change the component that is being rendered inside one of the grids, is there a method or a way to refresh just one element of the grid? same thing for a simple text if i wanna change something inside the grid it is not working for me.

vaheqelyan commented 2 years ago

Hey SekSion Take a look at this example https://svelte.dev/repl/24af394e0dda4eae82c10c9a14788352?version=3.44.2 You can use writable stores for your component data

Another solution would be to emit an event from a component you want to update.

SekSion commented 2 years ago

i think this helps for my needs, thanks!