mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-29 17:36:24 +00:00
combogrid: fix validation if valueField is different than displayField
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e57e32d5d9
commit
c59a0a3e43
@ -340,6 +340,13 @@ Ext.define('Proxmox.form.ComboGrid', {
|
|||||||
return true; // handled later by allowEmpty in the getErrors call chain
|
return true; // handled later by allowEmpty in the getErrors call chain
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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) {
|
||||||
|
value = me.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
if (!(me.notFoundIsValid || me.isValueInStore(value))) {
|
if (!(me.notFoundIsValid || me.isValueInStore(value))) {
|
||||||
return gettext('Invalid Value');
|
return gettext('Invalid Value');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user