Hi everyone, I have this need.
I have five filtered tables, each onRowSelect() event on them, must perform the same function.
Can I write the five onRowSelect() events in OR? Or should I create five onRowSelect() events for each table?
Thanks
Claudio
Where is your code?
If you want to perform the same function, but multiple times from different places/locations/events…
$w('#button1').onClick(()=>{start_myFilter});
$w('#button2').onClick(()=>{start_myFilter});
$w('#button3').onClick(()=>{start_myFilter});
function start_myFilter() {
//here your filtering function
}
If you want to know exactly from which of your buttons the function was started (for example to identify the current selected row)…
$w('#button1').onClick(()=>{start_myFilter(1)});
$w('#button2').onClick(()=>{start_myFilter(2)});
$w('#button3').onClick(()=>{start_myFilter(3)});
function start_myFilter(index) {console.log(index)
//here your filtering function
}
Expand this example and turn the INDEX into → “selectedRow”, or even pass the whole rowData to the function and do what ever you want with it.
$w("#myTableIDhere").onRowSelect((event)=> {console.log("EVENT: ", event);
let rowData = event.rowData;
start_myFilter(rowData);
});
Thank you so much for the support.
Sorry, i haven’t written code yet, next time i will post it.