Replies: 1 comment
-
Assuming I understand the question correctly, it sounds like you have a query that you want to avoid running multiple times -- i.e. you want to run the query once and pass it to both your Chart component and to your Table component. If that is correct, you could try this (which seems to work in Livewire 3 and Powergrid 5.x): You would need three components: ContainerComponent.php
livewire/container-component.blade.php
TableComponent.php
This way your query is only run once in your container component and then you just pass the results of your query to both components. You just need a public property (i.e. the |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm using Powergrid 3.x is there a possibility to pass a variable to a table component somehow from Livewire Component in which table is rendered?
It's the question, because I'm rendering a chart using Chart.js with the same data which Powergrid table is using and I'm let's say "doubling" the query unnecessary.
I know that passing parameter is possible, and the
datasource()
method is using Builder, but I'm wondering if it's possible...Is it?
Beta Was this translation helpful? Give feedback.
All reactions