Keep Persistence of Column Filtered Setting in Assignment Grid

Support for v6.x of our Scheduling components


Post Reply
User avatar
viragjain
Premium Member
Premium Member
Posts: 89
Joined: Thu Apr 25, 2019 9:06 am

Keep Persistence of Column Filtered Setting in Assignment Grid

Post by viragjain »

Hi Team,

As I have checked with Advanced demo, in Assignment Grid while applying sorting for Name column. On closing and reopening it sorting will get reset to normal. Is there a way to persist the sorting settings for Name column and even for customized column appended in Assignment Grid Pop Up.


User avatar
viragjain
Premium Member
Premium Member
Posts: 89
Joined: Thu Apr 25, 2019 9:06 am

Re: Keep Persistence of Column Filtered Setting in Assignment Grid

Post by viragjain »

One more separate issue related to Assignment Grid:
Its not showing sorting icon on resize of Assignment Grid UI for Name column. Column header text should get overflow: hidden but icon should also be visible. We tried

Code: Select all

.x-column-header-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

which result in showing the sorting icon and full name in column header but search box is visible partially on resize of pop up. We need above css for other Gantt columns headers but its affecting Assignment Grid Pop as mentioned.

Find the sample app.

Attachments
SampleApp.zip
Sample Gantt Demo with customized Assignment Grid.
(23.16 MiB) Downloaded 16 times

User avatar
arcady
Core Developer
Core Developer
Posts: 2531
Joined: Wed Mar 20, 2013 6:57 am

Re: Keep Persistence of Column Filtered Setting in Assignment Grid

Post by arcady »

viragjain wrote:
Sat Sep 12, 2020 2:56 pm

Hi Team,

As I have checked with Advanced demo, in Assignment Grid while applying sorting for Name column. On closing and reopening it sorting will get reset to normal. Is there a way to persist the sorting settings for Name column and even for customized column appended in Assignment Grid Pop Up.

It's a generic Ext JS question. Your application should setup a provider to persist components state etc... Please see https://docs.sencha.com/extjs/6.2.0/classic/Ext.state.Stateful.html#cfg-stateful docs.


User avatar
arcady
Core Developer
Core Developer
Posts: 2531
Joined: Wed Mar 20, 2013 6:57 am

Re: Keep Persistence of Column Filtered Setting in Assignment Grid

Post by arcady »

Ah wait you mean assignment grid.. Yes I see that now. We have hardcoded sorting in Gnt.widget.AssignmentGrid#loadTaskAssignments

Code: Select all

        // Apply sort to show assigned resources at the top
        store.sort({
            sorterFn : this.sortResourcesFn
        });

        // HACK Ext JS saves the sorter, remove it explicitly
        store.getSorters().removeAll();

As far as I see you already override that method so you can try saving sorters and restoring them back after callParent . Something like this:

Code: Select all

    loadTaskAssignments: function(taskId) {
        ...
        // save sorters and restore them back (parent class resets sorting)
        var sorters = this.store.getSorters().getRange();
        this.callParent(arguments);
        this.store.getSorters().add(sorters);
    },

User avatar
arcady
Core Developer
Core Developer
Posts: 2531
Joined: Wed Mar 20, 2013 6:57 am

Re: Keep Persistence of Column Filtered Setting in Assignment Grid

Post by arcady »

Regarding your second question I cannot reproduce it. Could you give exact steps to see the problem?


User avatar
viragjain
Premium Member
Premium Member
Posts: 89
Joined: Thu Apr 25, 2019 9:06 am

Re: Keep Persistence of Column Filtered Setting in Assignment Grid

Post by viragjain »

Steps:

  1. Open a PopUp, squiz the popup and you can see Search Textfield is partially visible due to white-space: normal css.
  2. Try re-opening and now apply sorting and again squiz it, you can see column header text and sorting icon is visble but search text field is again partially visible.

Header height is not getting adjusted based on both components.

Attachments
Screenshot (180).png
Screenshot (180).png (236.23 KiB) Viewed 223 times
Screenshot (179).png
Screenshot (179).png (235.06 KiB) Viewed 223 times
Screenshot (178).png
Screenshot (178).png (235.51 KiB) Viewed 223 times

User avatar
arcady
Core Developer
Core Developer
Posts: 2531
Joined: Wed Mar 20, 2013 6:57 am

Re: Keep Persistence of Column Filtered Setting in Assignment Grid

Post by arcady »

I would simply set https://docs.sencha.com/extjs/6.2.0/modern/Ext.grid.column.Column.html#cfg-minWidth on the column to the minimal value allowing it to look correct.


Post Reply