[ML] Hide Data Grid column options when histogram charts are enabled. (#79459)
* [ML] Fix data grid actions. * [ML] fix columnsWithChartsActionized Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
This commit is contained in:
parent
4ed1cb3e38
commit
045e7d9098
|
@ -99,6 +99,14 @@ export const DataGrid: FC<Props> = memo(
|
|||
// };
|
||||
// };
|
||||
|
||||
// If the charts are visible, hide the column actions icon.
|
||||
const columnsWithChartsActionized = columnsWithCharts.map((d) => {
|
||||
if (chartsVisible === true) {
|
||||
d.actions = false;
|
||||
}
|
||||
return d;
|
||||
});
|
||||
|
||||
const popOverContent = useMemo(() => {
|
||||
return analysisType === ANALYSIS_CONFIG_TYPE.REGRESSION ||
|
||||
analysisType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION
|
||||
|
@ -254,7 +262,7 @@ export const DataGrid: FC<Props> = memo(
|
|||
<div className="mlDataGrid">
|
||||
<EuiDataGrid
|
||||
aria-label={isWithHeader(props) ? props.title : ''}
|
||||
columns={columnsWithCharts.map((c) => {
|
||||
columns={columnsWithChartsActionized.map((c) => {
|
||||
c.initialWidth = 165;
|
||||
return c;
|
||||
})}
|
||||
|
|
Loading…
Reference in a new issue