[pve-devel] [PATCH proxmox-widget-toolkit] form: add Proxmox.form.field.DisplayEdit
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Apr 2 10:27:55 CEST 2020
On 4/2/20 10:14 AM, Dominik Csapak wrote:
> one nit inline, high level comment here:
>
> one thing did come to mind what may be 'dangerous' is
> if the caller of this uses a change listener, since
> it suddenly would trigger for both fields i guess?
Yeah, that's the plan. One can control that (by setting it just in
editConfig, or checking for the field being disabled in the listener
- if it even triggers then)
> (e.g. in an edit window, but did not test)
> or validator? but i guess a displayfield does not
> validate anyway...
No, it doesn't, it has it short circuited to:
validateOnChange: false,
isValid: Ext.returnTrue,
validate: Ext.returnTrue
https://docs.sencha.com/extjs/6.0.1/classic/src/Display.js.html
>
> also how about setting the value?
> the inputpanel for example does:
> ---8<---
> query('[isFormField][name='+id+']')[0]
> --->8---
> so it only sets the first field it finds.
> can that be a problem?
It worked fine here in the example conversions I did, but I can retake a
look to ensure this wasn't just due to a non inputpanel use or the like.
More information about the pve-devel
mailing list