Preview / live differences after 'onCellSelect'

Here are my thoughts

	$w('#Table').onCellSelect((event) => {
		let col = event.cellColumnId;
	})	

can produce four different values for col.

  1. The column header which was defined when the table was created. This value is actually the value for label in the table columns array. This is the value returned in the Preview version of WiX Velo and was, until recently, the value returned for several years in the Live version of WiX Velo.

  2. The id for the column which is defined in the table columns array. This value looks like this: ‘column_kmirk4tc’ and is the same value generated for the table in Preview or Live. It may be generated when the table is created but it may change if the table is changed.

  3. The value listed in the Velo documentation which looks like this ‘columnId_b2h3-87d9-49250’.

  4. A user defined id which is created by making a copy of the table columns array and replacing the id with something else. A relatively simple solution to the problem would be to replace the id values with the label values and everything will work in both Preview and Live.
    However, there is a simpler solution which deals with the first three cases and it goes like this:

$w('#Table').onCellSelect((event) => {
    let col = event.cellColumnId;
    if (col.indexOf('column') === 0) { //returned id instead of label
        for (var i in cols) {
            if (cols[i].id === col) {
                col = cols[i].label;
                break;
            }
        }
    }
    ....
})                    

Everything works as before and if the retuned value should be changed back in future the code will still work. There may be a better answer. I always look for simple solutions. But the problem should not have appeared.