【问题标题】:agSelectCellEditor dropdown shows below mat-dialogagSelectCellEditor 下拉列表显示在 mat-dialog 下方
【发布时间】:2023-01-04 14:46:21
【问题描述】:

我在 mat-dialog 中有一个 ag-grid。网格有一个使用 agSelectCellEditor 的列。当我单击该列以显示下拉列表时,它显示在 mat-dialog 下方。列定义如下

   {
      headerName: 'Subcategory',
      resizable: true,
      field: 'subCategoryName',
      width: 200,
      cellEditor: 'agSelectCellEditor',
      cellEditorParams: {
        values: ['']
      },
      editable: true,
      cellStyle: function (params) {
        return {
          'background-color': 'white',
          'border-bottom': '1px dotted silver'
        };
      },

我尝试更改 cellStyle 以修改 z-index,添加 cellClass 以使用具有更高 z-index 的类,使用 ng::deep 查找相关类并修改 z-index。这些尝试都没有奏效。我想知道它是否与 cdk-overlay-container 有关,但不知道它是如何工作的。你能建议吗?

【问题讨论】:

    标签: angular angular-material ag-grid ag-grid-angular


    【解决方案1】:

    提示:这可以解决问题。 .ag-popup-child { z-index: 9999 !important; } .ag-popup-editor { z-index: 9999 !important;}

    【讨论】:

      猜你喜欢
      • 2014-06-05
      • 2021-12-15
      • 2017-02-04
      • 1970-01-01
      • 2018-11-22
      • 1970-01-01
      • 1970-01-01
      • 2016-01-28
      • 1970-01-01
      相关资源
      最近更新 更多