]> git.proxmox.com Git - proxmox-widget-toolkit.git/commit
combo grid: load: rework auto-selection and validity logic
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Jun 2021 16:03:25 +0000 (18:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Jun 2021 16:07:38 +0000 (18:07 +0200)
commit585f3c31e753bc90fa82de800083f5a0a89ba032
tree3056d3033aa6de875836a4d875b9291343b4895c
parenta0451be0caef5452962deb3b3449f503d86e3e81
combo grid: load: rework auto-selection and validity logic

We do not want to trigger an autoSelect if there's a value set, even
if it isn't found in the store, as that hides the fact that an (now)
invalid valid is configured from the user, which can be confusing if
something is not working, as when editing an object it seems like a
valid value is selected.

Further, if a value is set we mark the field as invalid from the
start, at least if it's neither disabled nor allowed to have a
value which is does not exists in the backing store.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/form/ComboGrid.js