Skip to content

How to skip cell navigation on non-editable column on Tab key hit #4021

@ymita

Description

@ymita

Question

I have a question about igxGrid. After selecting a cell, hitting Tab key moves active cell to the next one by default. Now how can I skip cell when it is not editable? (And the focus moves to the next editable cell.)

  • igniteui-angular version: 7.1.8
  • browser: n/a

As far as I tested,

  1. I handled document's keyup event, however, focus rectangle is visible for a short period time and I wonder if there is a better way to achieve the scenario.
  @HostListener('document:keyup', ['$event'])
  onkeyup(event) {
    console.log('onkeyup ', event);
    const cells = this.grid.selectedCells as Array<IgxGridCellComponent>;
    const firstSelectedCell = cells[0];
    if (!firstSelectedCell.column.editable) {
      cells[0].dispatchEvent(event);
    }
  }
  1. onFocusChange fires earlier than cell focus completes and it seems this is not the right timing.
  2. I could not find a way to make this work on onSelection timing.

Here is the sample I am working on. app1.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions