[pve-devel] [PATCH widget-toolkit V2] ComboGrid: fix sorting when filtering

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 27 12:01:38 CEST 2022


On 16.03.22 12:34, Matthias Heiserer wrote:
> When clicking on a column to sort it, the filter doesn't reset.
> Previously, it forgot the filter until the value was changed.
> 
> Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
> ---
> Changes from v1:
> Introduce a config property to (en|dis)disable clearing the filter

nit, ant I don't want to be annoying, but can you please add a empty line
below, and maybe even above the series-change log for easier visibility?
I'd at least appreciate that quite a bit, thx!

>  src/form/ComboGrid.js | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
> index 33c1d75..fa1078d 100644
> --- a/src/form/ComboGrid.js
> +++ b/src/form/ComboGrid.js
> @@ -12,6 +12,9 @@ Ext.define('Proxmox.form.ComboGrid', {
>  
>      // this value is used as default value after load()
>      preferredValue: undefined,
> +    clearFilterOnBlur: false,

this changes the default of an ExtJS config that is used in other context though?


> +    clearFilterOnExit: true,
> +
>  
>      // hack: allow to select empty value
>      // seems extjs does not allow that when 'editable == false'
> @@ -470,4 +473,12 @@ Ext.define('Proxmox.form.ComboGrid', {
>  	    }
>  	});
>      },
> +
> +    listeners: {
> +	collapse: function() {
> +	    if (this.clearFilterOnExit) {
> +		this.clearLocalFilter();
> +	    }
> +	},
> +    },
>  });






More information about the pve-devel mailing list