Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Grid and combobox editor demo not working as expected

The grid editing demo at StackBlitz seems to be broken with the combobox integration for the "Available At" column.

  • When the cell goes into edit mode, the selected item(s) which were displayed in the cell are not checked in the combobox editor.
  • After the selection has been made and the cell edit committed, the updated cell value that's displayed has a few problems:
    • The original values may still be still listed, even if those values were no longer selected.
    • There is no value listed for the newly selected options.

Could you please fix this so we have an understanding of how to use the combobox properly with the grid?

  • 80
    Offline posted

    Hi Jonathan,

    Thanks for reaching out to us!

    The sample is indeed incorrect, we'll address that as soon as time permits.

    The combo is not properly configured - it's set to use a `[valueKey]`, but the `[(ngModel)]` is passing object references.

    To fix this, when defining the editing template, use a combo without a `[valueKey]` property and define a `[displayKey]`:

    <ng-template igxCellEditor let-cell="cell" let-value>
                        <igx-combo type="line" [(ngModel)]="cell.editValue" displayKey="shop" [data]="locations" width="220px"></igx-combo>

    You can learn more about combo binding in the official documentation.

    Here is a working StackBlitz example.

    Hope this helps!