简体   繁体   English

Wijmo Grid 更新后无法正常工作

[英]Wijmo Grid works incorrectly after update

Recently had an wijmo update during updating project to the 13 angular version.最近在将项目更新到 13 angular 版本期间进行了一次 wijmo 更新。

Previous wijmo version: 5.20183.568 Current: 5.20221.842以前的 wijmo 版本:5.20183.568 当前:5.20221.842

We had updated everything (at least we believe so), including switch from 'wijmo/wijmo.grid' to '@grapecity/wijmo.grid' and so on.我们已经更新了所有内容(至少我们相信如此),包括从“wijmo/wijmo.grid”切换到“@grapecity/wijmo.grid”等等。

The way it works however, sometimes seems extremely wonky for no obvious reason.然而,它的工作方式有时似乎非常不稳定,没有明显的原因。

For my particular case, I have a simple grid:对于我的特殊情况,我有一个简单的网格:

wj-flex-grid(#flex, class="grid", [itemsSource]="listOfHolidays", [selectionMode]="3", (itemsSourceChanged)="itemsSourceChangedHandler()",
            width="100*", [headersVisibility]="1", (selectionChanged)="holidaySelected($event)")
   wj-flex-grid-filter(#flexFilter, [filterColumns]="['name', 'start', 'end']") 
   wj-flex-grid-column([header]="Holiday Name", [binding]="'name'", [isReadOnly]="true", [width]="70")
...
...

For whatever reason, (selectionChanged) just doesn't work anymore.无论出于何种原因, (selectionChanged)不再起作用。 It triggers a couple of times (equal to rows count) during the screen loading, and then stops.它在屏幕加载期间触发几次(等于行数),然后停止。 Previously, it is used to trigger on mouse click on the row.以前,它用于在鼠标单击行时触发。

Also, the insides of markup is also seems different:此外,标记的内部也似乎有所不同:

The insides of wj-row differs New grid (with selected row, it is still possible to do with dataItem.selected = true ) ( role="row" ) does not have aria-selected="true" . wj-row的内部不同 新网格(对于选定的行,仍然可以使用dataItem.selected = true )( role="row" )没有aria-selected="true" It also doesn't receive wj-state-selected , wj-state-active and wj-state-multi-selected classes ( role="gridcell" ).它也不接收wj-state-selectedwj-state-activewj-state-multi-selected类( role="gridcell" )。

This doesn't make sense to have such amount of issues even on basic level, unless something went terribly wrong during the update.即使在基本级别上出现如此多的问题也是没有意义的,除非在更新期间出现了严重错误。

Could you please help me to figure out what exactly am I overlooking or missing?你能帮我弄清楚我究竟忽略或错过了什么吗?

I don't have that much experience with Wijmo, but honestly, I don't think you have anything to lose.我对 Wijmo 没有太多经验,但老实说,我认为你没有什么可失去的。 So, here we go...所以,我们在这里 go...

Could you try using a debounce version of the method?您可以尝试使用该方法的去抖动版本吗?

public holidaySelectedDebounce: (event) => void;

ngOnInit(): void {
   this.holidaySelectedDebounce = debounce(this.holidaySelected, 300);
}

and then in your HTML:然后在你的 HTML 中:

wj-flex-grid(#flex, class="grid", ..., 
    (selectionChanged)="holidaySelectedDebounce($event)")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM