尝试对闪电数据表进行排序时,会弹出错误“NoErrorObjectAvailable”。
HTML:
key-field="Id"
data={jobItems}
columns={columns}
hide-checkbox-column
onrowaction={handleRowAction}
onsort={updateColumnSorting}
></lightning-datatable>```
JS:
updateColumnSorting(event)
{
var fieldName = event.detail.fieldName;
var sortDirection = event.detail.sortDirection;
console.log('## fieldName: ' + fieldName);
console.log('## sortDirection: ' + sortDirection);
}```
ERROR:
[NoErrorObjectAvailable] 脚本错误。a()@https://static.lightning.force.com/cs70/auraFW/javascript/7p9HLMpgnV2GO9Mq/aura_prod.js:948:169 {匿名}()@https://static.lightning.force.com/cs70 /auraFW/javascript/7p9HLMpgnV2GO9Mq/aura_prod.js:948:362 ln.dispatchEvent()@https://static.lightning.force.com/cs70/auraFW/javascript/7p9HLMpgnV2GO9Mq/aura_prod.js:12:12146 ln.fireSortedColumnChange ()@https://COMPANY_NAME--SANDBOX_NAME.lightning.force.com/components/lightning/datatable.js:2:66247 ln.handleUpdateColumnSort()@https://COMPANY_NAME--SANDBOX_NAME.lightning.force.com/组件/闪电/datatable.js:2:65875```