Hello All.
I am working on a page that will take user selections from a dropdown element and populate information into a table element based on the selection. After a row has been inserted into the table, certain cells in the row should be editable by the user. Getting the dropdown information and inserting the related information into the table is working perfectly. However, selecting a cell, any cell, is not working as expected.
My thought was to use the onCellSelect event but I am unable to get that event to fire, or to detect that it has fired. I have also tried to use the table’s onClick event, but I can’t capture / detect that either. I have the event code written, essentially, from the examples on their respective Corvid Reference pages for those two events but it still doesn’t seem to work. Any help would be greatly appreciated.
Here are some code snippets of what I am doing:
export function donationTable_onCellSelect(event) {
// Add your code for this event here:
console.log("\tInside onCellSelect event handler.....");
let cellColId = event.cellColumnId; // get the column ID
let cellData = event.cellData; // get the existing data in the cell
let cellRowIndex = event.cellRowIndex; // get the row index
console.log("\t\tColumnId: [" + cellColId + "]\tRowIndex: [" + cellRowIndex + "]\tData: [" + cellData + "]");
}
export function donationTable_click(event) {
// Add your code for this event here:
console.log("\tInside donationTable_click event handler....");
}
I never see any console messages for these two events when I am in the editor preview window so I am at a loss as to why they aren’t firing or why I can’t detect that they are firing.
For reference, I have used this for the onClick code: https://www.wix.com/corvid/reference/$w/table/onclick
I have used this for the onCellSelect code:
Here is a picture of my table settings for reference as well:
Again, any help or insight would be greatly appreciated.