* [pve-devel] [PATCH widget-toolkit] fix usage of findRecord
@ 2020-11-26 8:23 Dominik Csapak
2021-01-26 17:54 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-11-26 8:23 UTC (permalink / raw)
To: pve-devel
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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH widget-toolkit] fix usage of findRecord
2020-11-26 8:23 [pve-devel] [PATCH widget-toolkit] fix usage of findRecord Dominik Csapak
@ 2021-01-26 17:54 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-01-26 17:54 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
On 26.11.20 09:23, Dominik Csapak wrote:
> 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@proxmox.com>
> ---
> src/form/ComboGrid.js | 4 ++--
> src/form/RealmComboBox.js | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-26 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 8:23 [pve-devel] [PATCH widget-toolkit] fix usage of findRecord Dominik Csapak
2021-01-26 17:54 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox