[pmg-devel] applied: [PATCH pmg-gui 2/4] MailTracker: buffer onFilterChange

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Apr 24 21:15:41 CEST 2020


On 4/24/20 3:57 PM, Dominik Csapak wrote:
> so that the store gets loaded only when the user stops typing
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  js/MailTracker.js | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/js/MailTracker.js b/js/MailTracker.js
> index 23f7413..9a6774b 100644
> --- a/js/MailTracker.js
> +++ b/js/MailTracker.js
> @@ -99,7 +99,12 @@ Ext.define('PMG.MailTrackerFilter', {
>  		{
>  		    fieldLabel: gettext('Start'),
>  		    reference: 'starttime',
> -		    listeners: { change: 'onFilterChange' },
> +		    listeners: {
> +			change: {
> +			    fn: 'onFilterChange',
> +			    buffer: 500,
> +			},
> +		    },
>  		    value: (function() {
>  			var now = new Date();
>  			return new Date(now.getTime() - 3600000);
> @@ -118,7 +123,12 @@ Ext.define('PMG.MailTrackerFilter', {
>  		{
>  		    fieldLabel: gettext('End'),
>  		    reference: 'endtime',
> -		    listeners: { change: 'onFilterChange' },
> +		    listeners: {
> +			change: {
> +			    fn: 'onFilterChange',
> +			    buffer: 500,
> +			},
> +		    },
>  		    value: (function() {
>  			var now = new Date();
>  			var tomorrow = new Date();
> 

applied, thanks!



More information about the pmg-devel mailing list