igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

[igx-grid] "quick clicking twice resizer " can sometimes lead to unable to sort.

Open tkiryu opened this issue 7 years ago • 3 comments

Description

"quick clicking twice resizer" can sometimes lead to unable to sort. It's not a double-click. It's a little slower than double-click.

  • igniteui-angular version: 7.2.9
  • browser: N/A

Steps to reproduce

  1. Run the attached sample.
  2. Mouse down and hold until resizer handler shows up.
  3. Then click quickly.

Result

After step3, columns can't be sorted.

You might feel that it is difficult to reproduce. But steps 2-3 are almost double-click. Therefore, there is a good chance for this issue to happen accidentally.

igx-grid-sorting-issue

Expected result

Columns should be able to be sorted.

Attachments

igx-grid-sorting-issue.zip

tkiryu avatar May 21 '19 12:05 tkiryu

Hi, @SAndreeva , By operating steps 2-3, for some reason, it seems that colResizingService.isColumnResizing is not set to false, thus sorting becomes not working.

https://github.com/IgniteUI/igniteui-angular/blob/7.2.9/projects/igniteui-angular/src/lib/grids/grid-header.component.ts#L155-L168

    @HostListener('click', ['$event'])
    public onClick(event) {
        if (!this.colResizingService.isColumnResizing) {
            event.stopPropagation();
            if (this.grid.filteringService.isFilterRowVisible) {
                if (this.column.filterable && !this.column.columnGroup &&
                    !this.grid.filteringService.isFilterComplex(this.column.field)) {
                    this.grid.filteringService.filteredColumn = this.column;
                }
            } else if (this.column.sortable) {
                this.triggerSort();
            }
        }
    }

tkiryu avatar May 22 '19 04:05 tkiryu

I ran into a behavior that the column resizer is not hidden when I accidentally moved mouse cursor during operating step 3. It is similar to #4610. I operated this again and again, then I managed to reproduce this. I'm attaching reproducible gif.

igx-grid-resizer-issue

Since it was so difficult to reproduce, you may not able to do that.

I'm not sure but I guess the root cause is the same as this issue. Could you please consider this resizer behavior when you work on this issue?

Thanks!

tkiryu avatar May 23 '19 08:05 tkiryu

@tkiryu, thanks for reporting and investigating these behaviors. I will take a look and try fixing both of them.

SAndreeva avatar Jun 05 '19 08:06 SAndreeva