I want Sum price table not click button, now if I want knowing sum i’m must click button
please support …
export function button1_click(event, $w) {
// For full API documentation, including code examples, visit Velo API Reference - Wix.com
// no need to set the filter on the database since it’s still set
// how many items filtered in the dataset?
let count = $w(“#dataset1”).getTotalCount();
// get all of the items
$w(“#dataset1”).getItems(0, count)
.then((results) => {
let sumTotal = 0; // declare sum
let items = results.items;
items.forEach(item => {
// the amount is a string so convert
sumTotal = sumTotal + item.price
console.log(sumTotal);
$w(“#textSum”).text = “” + sumTotal;
});
}). catch ((err) => {
console.log(err);
});
}
//Add your code for this event here:
