Describe the bug
When data tables are custom sorted by a metric, removal of buckets is broken and results in the error dataGridColumns[sort.colIndex] is undefined
To Reproduce
Steps to reproduce the behavior:
Create a data table visualisation with metrics and at least one bucket, or go this playground link&_a=(filters:!(),linked:!f,query:(language:kuery,query:''),uiState:(vis:(sortColumn:(colIndex:0,direction:asc))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'3',params:(field:bytes,percents:!(50)),schema:metric,type:median),(enabled:!t,id:'2',params:(field:bytes),schema:metric,type:min),(enabled:!t,id:'4',params:(field:bytes),schema:metric,type:max),(enabled:!t,id:'5',params:(field:request.keyword,missingBucket:!f,missingBucketLabel:Missing,order:desc,orderBy:'1',otherBucket:!f,otherBucketLabel:Other,size:20),schema:bucket,type:terms)),params:(perPage:10,percentageCol:'',showMetricsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,totalFunc:sum),title:'(Table)%20Bytes%20by%20request%20stats%20summary',type:table))) for the visualisation called "(Table) Bytes by request stats summary"
Click on the metric column (Max bytes if using above link) and then Sort desc
Now using the sidebar, delete (or hide) the Bucket aggregation (Split rows: request.keyword) and click Update
The error dataGridColumns[sort.colIndex] is undefined is returned
Describe the bug When data tables are custom sorted by a metric, removal of buckets is broken and results in the error
dataGridColumns[sort.colIndex] is undefined
To Reproduce Steps to reproduce the behavior:
dataGridColumns[sort.colIndex] is undefined
is returnedOpenSearch Version: 2.14.0 Dashboards Version: 2.14.0