Hi, I am using revogrid with row headers turned on, as well as utilizing sortable columns. I think there is a minor bug whenever a click is made in the "initial column header", the one that sits above the row headers. Here is the exception:
revo-grid_10.entry.js:1 Uncaught (in promise) TypeError: Cannot read property 'sortable' of undefined at HTMLElement.<anonymous> (revo-grid_10.entry.js:1) at K (index-a7f99799.js:1) at Object.emit (index-a7f99799.js:1) at Object.onClick (revo-grid_10.entry.js:1) at HTMLDivElement.onClick (revo-grid_10.entry.js:1)
The issue is in the headerclick listener in sorting.plugin.ts (~ line 58), where the event detail is looked at:
if (!e.detail.column.sortable) { return; }
In the case of having row headers on, e.detail.column is undefined and an exception is thrown. The fix is straightforward:
if (!e.detail.column || !e.detail.column.sortable) { return; }
Hello @stevexm, thank you for this update, we shall check it shortly.
I would recommend for the future to make a pull request with a fix, it'll be easier to review and update.
Appreciate your feedback.
Hi, I am using revogrid with row headers turned on, as well as utilizing sortable columns. I think there is a minor bug whenever a click is made in the "initial column header", the one that sits above the row headers. Here is the exception:
revo-grid_10.entry.js:1 Uncaught (in promise) TypeError: Cannot read property 'sortable' of undefined at HTMLElement.<anonymous> (revo-grid_10.entry.js:1) at K (index-a7f99799.js:1) at Object.emit (index-a7f99799.js:1) at Object.onClick (revo-grid_10.entry.js:1) at HTMLDivElement.onClick (revo-grid_10.entry.js:1)
The issue is in the headerclick listener in sorting.plugin.ts (~ line 58), where the event detail is looked at:
if (!e.detail.column.sortable) { return; }
In the case of having row headers on, e.detail.column is undefined and an exception is thrown. The fix is straightforward:
if (!e.detail.column || !e.detail.column.sortable) { return; }
Hope this helps,
Steve