Raymond25
(Raymond DiLorenzo)
1
Having some problems coming up with the code for implementing sortable cols with a Firebase db as the data source.
- How to designate a Firebase db as a remote datasource ? I’m using the firebase-collection web component currently.
- What Vaadin methods should be used to refresh the view?
I would appreciate anyone’s help with the topic.
Some code I’m working with:
https://gist.github.com/Rdilorenzo73/ad6f98d01ccbf3769b23
Sami58
(Sami Suo-Heikki)
2
Hi Raymond,
The easiest way to use Firebase db as remote datasource is to do it with JavaScript and not with firebase-collection.
You can use ‘sort-order-changed’ listener for updating the order of the items.
I’ve used Firebase db + Vaadin grid in one of my projects.
https://github.com/samiheikki/Vaadin-Bugrap/blob/master/custom-elements/bugrap/bugrap.js
Check function updateReportGrid and this.grid.addEventListener(“selected-items-changed”…):
-Sami