Flexgrid/Angular 9: autoSizeRows causing bug in 2019.3 CellEdit type

Posted by: ramiro.olivencia on 20 May 2020, 8:11 am EST

  • Posted 20 May 2020, 8:11 am EST

    Hi!

    We've updated our application to Angular 9 and version 2019.3 of Wijmo, which supports this angular version.

    In one of the grids of our application, the cyan colored ones with numbers, we made extensive use of the feature of editing the displayed value with help of the keyboard, with Flexgrid providing us with the capabilities of editing the cell by writing a number, without having to double-click the cell to edit. Then, if we pressed Return key we navigated to the cell below without having to do click on it to edit, repeating the same pattern to do a mouse-free use of the grid.

    After we updated to 2019.3 version of Wijmo, we noticed that if we included the [autoSizeRows]="false" in the WjCellEditTemplate component, we lost the ability to achieve this mouse-free editing, having to double-click the CellEdit templated cells to be able to edit the cell value.

    We think that this is a Wijmo-related bug, and I clarify that the issue wasn't present in the previous version of Wijmo that we used, 2019.1, which we used together with Angular 8.

    Here I'm attaching an image of our customized grid and a snippet of code that details how we implement our WjFlexGridCellTemplate:

                <ng-template wjFlexGridCellTemplate [cellType]="'CellEdit'" [autoSizeRows]="false" let-row="row" let-item="item"
    let-cell="cell"
    *ngIf="col.isDataSourceValue">
    <svm-value-editor
    *ngIf="!!item
    && !(item.valueShowInfo && item.valueShowInfo[col.tag])
    && !!item.dataSourceValues[col.superHeader + col.tag]
    && !!item.dataSourceValues[col.superHeader + col.tag]['selectedUnitProfile']"
    [unitProfile]="item.dataSourceValues[col.superHeader + col.tag]['selectedUnitProfile']"
    [(value)]="cell.value">
    </svm-value-editor>
    </ng-template>


  • Replied 20 May 2020, 6:11 pm EST

    Hi,

    As per our understanding, your issue is that when you press a key, the editor does not get focused. So, you need to use the mouse to focus on the editor.
    It seems that this issue is fixed in the latest version (5.20201.664). I would suggest you upgrade Wijmo.

    But, if you cannot upgrade right now, as a workaround, you may handle the prepareCellForEdit event and move the focus on the editor manually.

    https://stackblitz.com/edit/angular-kpkbmr

    Regards,
    Ashwin
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels