Hello,
I am extremely new to this and have extremely limited coding experience. Most of my ocding is copying, pasting and editing the pertient bits to suit my needs.
I have so far figured out how CMS works to import tables into my site, and how to sort them as I wish to see them. However now i want to add the function of allowing site users to sort the data (not filter) on their chosen column.
So far I have added an invisible button above each column header I want them to be able to sort and I thought the code I entered below might work, however as I am here, you can imagine it didnt.
import wixData from “wix-data”;
export function button1_click(event) {
import wixData from “wix-data”;
$w(“#table1”).setSort(
wixData.sort().ascending(“K/D”).descending(“Name”),
);
}
As I said, totally new to this and coding isn’t something I’m overly experienced in.