Premium support for our pure JavaScript UI components


Post by jandresampaio »

Hi,

In your page grid example we've added the start column and use the filterBar to filter. After applying the filter an error occurs

TypeError: Cannot read properties of undefined (reading 'value') at ReadOnlyCombo.onSelect

Error after applying date filter.PNG
Error after applying date filter.PNG (305.4 KiB) Viewed 1003 times

Check the code attached and please advise on how to proceed. If this is a bug we need a workaround.

Thank you.

Attachments
Example_paged_grid.js
(3.92 KiB) Downloaded 63 times

Post by mats »

Could you please attach a fully runnable minimal test case? Then we can look into it.


Post by jandresampaio »

The example (.js) was attached on my post....


Post by Maxim Gorkovsky »

Hello.
I couldn't reproduce this exception on the latest code. I see date column values are wrong because field is not declared as a date. But also I can see that date field in the filter bar doesn't show correct value if you try to change it, I opened a ticket for this issue: https://github.com/bryntum/support/issues/3776

Can you describe steps to reproduce the problem? I would also recommend to try nightly build to see if this issue was already resolved


Post by jandresampaio »

The field is declared as date
I've mentioned that I'm using your example, so it's latest code...

I've simply added a date column:

Bryntum Grid - Paged grid with mocked Ajax.mp4
(1.86 MiB) Downloaded 64 times

Post by Maxim Gorkovsky »

You define column a date type, but model field is a regular string. Date column is trying to parse date according to the date format and gets wrong date (year is -1). Please refer to this doc: https://bryntum.com/docs/grid/api/Core/data/Model

Date fields should be explicitly declared:

class MyModel extends GridRowModel {
    static get fields() {
        return [
            { name : 'start', type : 'date' }
        ];
    }
}

store = new AjaxStore({
        modelClass      : MyModel,
        readUrl         : '/pagedMockUrl',
        pageParamName   : 'page',
        sortParamName   : 'sort',
        filterParamName : 'filter',
        pageSize        : pageSize,
        autoLoad        : true
    });

Post by jandresampaio »

Still, the error occurs after selecting a date on a paged grid...


Post by Maxim Gorkovsky »

Which version do you use? Latest one is 4.3.2, can you try that?


Post by jandresampaio »

Yes the error occurs on that. don't your examples run on latest version?
Also on our project the error occurs with 4.3.2


Post by Maxim Gorkovsky »

I didn't realize you were talking about the online version. I can confirm this issue exists in 4.3.2 but it will be fixed with next release which is coming soon.


Post Reply