[pve-devel] applied: [PATCH widget-toolkit 1/2] fix #2421: ComboGrid: correctly validate multiSelect variant

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Nov 25 18:41:30 CET 2019


On 11/25/19 11:04 AM, Dominik Csapak wrote:
> on multiSelect we have to check the values that is in the values
> array, but we get the 'displaystring' in the validator so we
> have to get the 'real' value (aka the underlying array of values)
> before checking if they are in the store
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  form/ComboGrid.js | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/form/ComboGrid.js b/form/ComboGrid.js
> index 6dac534..3cc64f9 100644
> --- a/form/ComboGrid.js
> +++ b/form/ComboGrid.js
> @@ -362,7 +362,11 @@ Ext.define('Proxmox.form.ComboGrid', {
>  	// we normally get here the displayField as value, but if a valueField
>  	// is configured we need to get the "actual" value, to ensure it is in
>  	// the store. Below check is copied from ExtJS 6.0.2 ComboBox source
> -	if (me.valueField && me.valueField !== me.displayField) {
> +	//
> +	// we also have to get the 'real' value if the we have a mulitSelect
> +	// Field but got a non array value
> +	if ((me.valueField && me.valueField !== me.displayField) ||
> +	    (me.multiSelect && !Ext.isArray(value))) {
>  	    value = me.getValue();
>  	}
>  
> 

applied, thanks!




More information about the pve-devel mailing list