Datatable isn't reactive. #93
victorbmlabs
started this conversation in
General
Replies: 3 comments
-
Hello When <script>
$: allResults, handler.setRows(allResults)
</script> But the best way would be at the end of const push_to_results = (result) => {
[...]
allResults.push({...})
handler.setRows(allResults)
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I transfered the discussion to the proper repositery |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah such a simple bug, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I am trying to create a datatable. I have an empty array
allResults
which I pass to theDataHandler
.On component mount I populate the
allResults
array with data from the database. I also push objects to it when the server sends a new object.However, after following the site's guide to add
$: handler.setRows(allResults);
my table is still empty on page load and only shows data when I'm forcing it to re-render (i.e when i filter or change the amount of entries)Beta Was this translation helpful? Give feedback.
All reactions