ParamQuery grid support forum

General Category => Bug Report => Topic started by: kshipra on November 08, 2018, 12:24:56 pm

Title: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: kshipra on November 08, 2018, 12:24:56 pm
Hi,

I recently upgraded grid to 5.5. I like new filters.

1. One thing I noticed was reset filter code is not working when condition is selected to "Empty/NotEmpty"
https://paramquery.com/pro/demos/filter_header_local


2. https://paramquery.com/pro/demos/readonly_cells

On country column in this example the rows grid lines - outer border is not showing. I would like the cell lines to show properly. It was working properly in older 3.4 version.

3. sorting not working properly
In 3.4 you can click anywhere in column header for sorting
https://paramquery.com/pro/demos33/sorting

In 5.5 - column is sorted only when clicked on the name hyperlink , does not work as in previous 3.4 version
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: paramvir on November 08, 2018, 09:20:46 pm
Thanks for your feedback.

1. What exactly you mean by reset filter not working for Empty / Not Empty. What's your suggestion.

2. Please add border-bottom-color: inherit; for now as updated in the demo.

https://paramquery.com/pro/demos/readonly_cells

3. It is intentional to click on the header title for sorting.
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: kshipra on November 08, 2018, 11:06:31 pm
1. What exactly you mean by reset filter not working for Empty / Not Empty. What's your suggestion.
In the demo  -  https://paramquery.com/pro/demos/filter_header_local  - there is Reset filters button. How I understand this reset filters functionality works is it should reset all the filters selected by user.  So user does not have to manually undo the filtered values entered. I have similar functionality implemented. It is working for other conditions in different filters but not for above 2 mentioned conditions, which I think is a bug.

2. Thanks for quick css help.

3. It is intentional to click on the header title for sorting. - 
I would like to understand why it was changed to click only on column names for sorting ? I need to explain to users.
Users that are used to old way of sorting on column headers are going to complain that sorting does not work. I can see my users complaining already. Is there any way that you can make it backward compatible ?




Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: paramvir on November 09, 2018, 12:00:01 pm
1. Ok, moving it to bug log.

3. It's changed from ergonomic point of view and to prevent accidental sort of column while trying to click the column header menu, resize column. Also click on column header might be reserved to select columns in upcoming versions. I would check if it can be made backward compatible ( via an option in sortModel )
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: paramvir on November 27, 2018, 03:23:43 pm
1 and 2 are fixed in v5.6.0

FOR 3, you can use sortModel.wholeCell
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: kshipra on November 27, 2018, 05:39:04 pm
Thank you for quick fix. I will get the new version.
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: kshipra on December 06, 2018, 01:45:40 pm
I downloaded 5.6 and tried reset filters. It is not working at all now. The code is blowing

This is how i have defined default filters for all columns.

 columnTemplate: { filter: { crules: [{ condition: "contain" }, {}] } },
                    filterModel: {
                        on: true,
                        mode: "AND",
                        header: true,
                        menuIcon: true //show filter row icon initially.
                    },

Reset filter button code:
 {
                                type: 'button',
                                label: 'Reset filters',
                                listener: function() {
                                    this.reset({ filter: true });
                                    //$('.filterValue').val("");
                                }
                            },

Internally pqgrid is throwing error:

clearFilters: function(t) {
            t.forEach(function(t) {
                var e = t.filter
                  , n = pq.filter.conditions;
                e && (e.crules || []).forEach(function(t) {
                    n[t.condition].nr && (t.condition = void 0),     -----------------------> Uncaught TypeError: Cannot read property nr of undefined.
                    t.value = t.value2 = void 0
                })
            })
        },

Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: paramvir on December 06, 2018, 02:13:59 pm
It looks like error is caused by empty condition in crules definition.

Please use this:

Code: [Select]
  crules: [{ condition: "contain" }]

instead of

Code: [Select]
  crules: [{ condition: "contain" }, {}]
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: kshipra on December 06, 2018, 02:51:33 pm
I changed the columnTemplate to

 columnTemplate: { filter: { crules: [{ condition: "contain" }] } },

but still same error is happening as mentioned in previous post.

colModel: [{dataIndx: "Name", width: 200, filter: {crules: [{condition: "contain"}]}, hidden: false},…]
0: {dataIndx: "Name", width: 200, filter: {crules: [{condition: "contain"}]}, hidden: false}
1: {dataIndx: "Code", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
2: {dataIndx: "UMask", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
3: {dataIndx: "Unit", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
4: {dataIndx: "Counter", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
5: {dataIndx: "ArchEvent", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
6: {dataIndx: "SourceComponent", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
7: {dataIndx: "UsedIn", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
8: {dataIndx: "ExternalVisibility", width: 100, filter: {crules: [{condition: "contain"}]}, hidden: false}
9: {dataIndx: "BriefDescription", width: 200, filter: {crules: [{condition: "contain"}]}, hidden: false}
10: {dataIndx: "PublicDescription", width: 200, filter: {crules: [{condition: "contain"}]}, hidden: false}
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: paramvir on December 06, 2018, 03:17:13 pm
I'm able to reproduce it, thanks for raising the issue.
Title: Re: row lines not showing and reset filter not working Not Empty/Empty condition
Post by: paramvir on December 17, 2018, 09:22:55 am
This is fixed in v5.6.1