[pve-devel] [PATCH widget-toolkit] fix usage of findRecord
Dominik Csapak
d.csapak at proxmox.com
Thu Nov 26 09:23:39 CET 2020
findRecord does not match exactly, but only at the beginning and
case insensitive, by default. Change all calls to be case sensiti
and an exactmatch (we never want the default behaviour afaics).
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/form/ComboGrid.js | 4 ++--
src/form/RealmComboBox.js | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
index 20c9455..07ea5fe 100644
--- a/src/form/ComboGrid.js
+++ b/src/form/ComboGrid.js
@@ -346,14 +346,14 @@ Ext.define('Proxmox.form.ComboGrid', {
if (Ext.isArray(value)) {
Ext.Array.each(value, function(v) {
- if (store.findRecord(me.valueField, v)) {
+ if (store.findRecord(me.valueField, v, 0, false, true, true)) {
found = true;
return false; // break
}
return true;
});
} else {
- found = !!store.findRecord(me.valueField, value);
+ found = !!store.findRecord(me.valueField, value, 0, false, true, true);
}
return found;
diff --git a/src/form/RealmComboBox.js b/src/form/RealmComboBox.js
index 309bf4f..5f61687 100644
--- a/src/form/RealmComboBox.js
+++ b/src/form/RealmComboBox.js
@@ -15,7 +15,7 @@ Ext.define('Proxmox.form.RealmComboBox', {
}
let me = this;
let val = me.getValue();
- if (!val || !me.store.findRecord('realm', val)) {
+ if (!val || !me.store.findRecord('realm', val, 0, false, true, true)) {
let def = 'pam';
Ext.each(records, function(rec) {
if (rec.data && rec.data.default) {
--
2.20.1
More information about the pve-devel
mailing list