Premium support for our pure JavaScript UI components


Post by dsingh7 »

Hi Team,

In my grid implementation I am storing grid state to backend and when user coming on the same grid I am pushing grid state and then after grid load pushing data to the grid.

Column config

filterable: {
        filterField : {
	    type : "combo",
	    multiSelect : true,
	    items : ["View","Edit","Owner","Co-owner"]
        },
        filterFn : ({ record, value }) => true
    },

So in above config I am passing filterFn to bypass grid filters and what ever data is there in column display regardless of filter.
This is working fine when user select filter on grid. Also this filter and sorting state is stored to backend. When user loading this grid again then data is not rendering in grid. this is happening for this dropdown type column.
if I remove and select another value for this filter then it starts working again.
Please suggest what I am doing wrong here


Post by alex.l »

Hi,

I am afraid, it's not clear what to do by description you shared. Please attach video with steps to reproduce.

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by dsingh7 »

So with above configuration when I am pushing old state to grid, data is not rendered in grid.
When I change any value in the given filter then it starts rendering data in grid.


Post by alex.l »

We need a full picture.
Am I right you keep store data in localStorage? Please show us how do you save data? How did you setup StateManager?

Please share runnable test case and steps to reproduce. It will help us to go forwards?

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by dsingh7 »

Hi Alex,

Please go through the video. I have applied filter on one dropdown column. then navigating to some other screen. then going back to same screen again.

So in back ground when filter applied I have stored grid state. and when user come back on the screen again then I push the saved state to grid again. This time grid is not loading row to grid but filter is persist. You can see the response in browser's network tab in video.

Grid Config

{
            appendTo: this.template.querySelector(".bryntum-container"),
            rowHeight: 37,
            maxHeight: 300,
            features: {
                search:true,
                cellEdit:false,
                autoHeight: false,
                filterBar:{
                    compactMode:false
                },
                stripe: true,
                columnReorder:true,
                group : false
            }
            store: bryntum.grid.Store({
                    fields: this.gridFields,
                    useLocaleSort: { sensitivity: "case" },
                    data: [],
                    listeners: {
                        filter: ({ filters }) => {
                            this.recordOffset = 0;
                            this.setFilterValue(filters);
                            sessionStorage.setItem("Grid-" + this.bryntumGridName, JSON.stringify(this.grid.state));
                        }
                    }
                }),
            columns: [{
                "text": "Madison Recommendation",
                "field": "madisonrecommendation",
                "filterable": {
                    "filterField": {
                        "items": [
                            "Key Contact - All",
                            "Key Contact - New",
                            "Key Contact - Upgraded",
                            "Opportunity - All",
                            "Opportunity - New",
                            "Opportunity - Downgraded"
                        ],
                        "multiSelect": true,
                        "type": "combo"
                    }
                }
            }],
            selectionMode: gd.selectionMode
        }
            

So first I am loading grid by using

this.grid = new bryntum.grid.Grid(gridConfig);

then pushing state

let state = sessionStorage.getItem("Grid-" + this.bryntumGridName);
this.grid.state = state;

then loading data

this.grid.store.data = this.data;

All configuration of column I have shared on previous comments. Please let me know if you need more information

Last edited by dsingh7 on Fri Dec 20, 2024 1:19 pm, edited 1 time in total.

Post by ghulam.ghous »

Thanks for the report, we have a ticket here to investigate this issue and fix it: https://github.com/bryntum/support/issues/10459


Post by satya »

Thanks Ghulam, any tentative eta on this please?


Post by ghulam.ghous »

Hey

No updates yet. Our most of the team is on vacations. They'll be back in the next week and hopefully someone get a chance to look at this one.


Post by satya »

Team, any ETA on resolution of this please


Post by marcio »

Hey satya,

Unfortunately, there is no ETA for now, I added a note to the ticket.

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post Reply