Issue
We are experiencing issues when checking the Store for changes.
this.grid.store.changes;
A large % of attempts will resolve in no changes which will not proceed with our desired implementation. This affects:
- Model Create
- Model Edit
Current Implementation
@Method()
public async loadData<T extends object>(data: T[]): Promise<void> {
if (!Array.isArray(data)) {
data = [];
}
this.store.data = data;
if (this.autoSizeOnDataLoad) {
await this.resizeColumns();
}
}
private get storeFields() {
const arr = Array.isArray(this.columns) ? this.columns : [];
return arr.filter(column => !this.columnTypes.includes(column.type)).map(({ field: name, storeType, type }) => ({
name,
type: storeType || type,
}));
}
private buildGridConfig(): Partial<GridConfig> {
const config = {
id: this.gridId,
appendTo: this.host,
height: '100vh',
...
store: {
fields: this.storeFields,
sorters: this.columnConfig?.sorters ?? [],
listeners: {
})