public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Matthias Heiserer <m.heiserer@proxmox.com>
Subject: Re: [pve-devel] [PATCH widget-toolkit 2/2] ComboGrid: fix sorting when filtering
Date: Tue, 15 Mar 2022 11:06:41 +0100	[thread overview]
Message-ID: <d7d04c35-3f70-cf24-f3af-75f2f2d1833d@proxmox.com> (raw)
In-Reply-To: <20220309141815.4118555-2-m.heiserer@proxmox.com>

On 3/9/22 15:18, 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@proxmox.com>
> ---
>   src/form/ComboGrid.js | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
> index 33c1d75..55aca3a 100644
> --- a/src/form/ComboGrid.js
> +++ b/src/form/ComboGrid.js
> @@ -12,6 +12,7 @@ Ext.define('Proxmox.form.ComboGrid', {
>   
>       // this value is used as default value after load()
>       preferredValue: undefined,
> +    clearFilterOnBlur: false,
>   
>       // hack: allow to select empty value
>       // seems extjs does not allow that when 'editable == false'
> @@ -470,4 +471,10 @@ Ext.define('Proxmox.form.ComboGrid', {
>   	    }
>   	});
>       },
> +
> +    listeners: {
> +	collapse: function() {
> +	    this.clearLocalFilter();
> +	},
> +    },
>   });

i think this is wrong, because we now have no way
to disable that functionality again?

i'd suggest saving the value of clearFilterOnBlur in the initComponent to another property
(e.g. originalClearOnBlur)and then in the collapsehandler only executing the
clear, when the original value was true (or not set, since true is the default)






  reply	other threads:[~2022-03-15 10:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 14:18 [pve-devel] [PATCH widget-toolkit 1/2] Combogrid: clear filter on blur Matthias Heiserer
2022-03-09 14:18 ` [pve-devel] [PATCH widget-toolkit 2/2] ComboGrid: fix sorting when filtering Matthias Heiserer
2022-03-15 10:06   ` Dominik Csapak [this message]
2022-03-16  8:55     ` Matthias Heiserer
2022-03-15 10:03 ` [pve-devel] applied: [PATCH widget-toolkit 1/2] Combogrid: clear filter on blur Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7d04c35-3f70-cf24-f3af-75f2f2d1833d@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=m.heiserer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal