小编use*_*133的帖子

ag-grid 以编程方式选择行不突出显示

使用 Angular 4(打字稿),我有一些使用 ag-grid 12.0.2 的代码,如下所示。我要做的就是加载我的网格并自动(以编程方式)选择第一行。

:
this.gridOptions = ....
    suppressCellSelection = true;
    rowSelection = 'single'
:

loadRowData() {
    this.rowData = [];
    // build the row data array...
    this.gridOptions.api.setRowData(this.rowData);

    let node = this.gridOptions.api.getRowNode(...);
    // console logging here shows node holds the intended row
    node.setSelected(true);
    // console logging here shows node.selected == true

    // None of these succeeded in highlighting the first row
    this.gridOptions.api.redrawRows({ rowNodes: [node] });
    this.gridOptions.api.redrawRows();
    this.gridOptions.api.refreshCells({ rowNodes: [node], force: true });
Run Code Online (Sandbox Code Playgroud)

选择了第一个节点,但该行拒绝在网格中突出显示。否则,鼠标行选择工作得很好。此代码模式与此处的示例代码相同:https : //www.ag-grid.com/javascript-grid-refresh/#gsc.tab=0它不起作用。 …

ag-grid ag-grid-ng2 ag-grid-angular

4
推荐指数
2
解决办法
8064
查看次数

你如何在Angular 5中使用Bootswatch主题

我试图在Angular 5项目中使用Bootswatch主题.我正在使用Bootswatch和Bootstrap版本4.0.0-beta-2.我已经通过npm安装了两个,并使用我的主要styles.scss中常用的angular-cli/webpack约定在styles.scss中导入_variables.scss和_bootswatch.scss.我还将相关主题bootstrap.min.css导入到此文件中,然后将其添加到angular.cli.json中的styles []数组中.

在构建期间,我得到:

@include box-shadow(none);
        ^
     No mixin named box-shadow
Run Code Online (Sandbox Code Playgroud)

和破碎的构建.

bootswatch bootstrap-4 angular5

3
推荐指数
1
解决办法
3168
查看次数