[pve-devel] [PATCH v2 3/3] Declare data object in one statement when we want to delete a parameter

Emmanuel Kasper e.kasper at proxmox.com
Wed Aug 19 08:25:08 CEST 2015


> On 08/18/2015 10:36 AM, Emmanuel Kasper wrote:
> > Also add missing formatting
> > ---
> >   www/manager5/form/KVComboBox.js | 9 ++++-----
> >   1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/www/manager5/form/KVComboBox.js
> > b/www/manager5/form/KVComboBox.js
> > index 77bf8f4..8b66dfc 100644
> > --- a/www/manager5/form/KVComboBox.js
> > +++ b/www/manager5/form/KVComboBox.js
> > @@ -7,7 +7,7 @@ Ext.define('PVE.form.KVComboBox', {
> >       extend: 'Ext.form.field.ComboBox',
> >       alias: 'widget.pveKVComboBox',
> >   
> > -    deleteEmpty: true,
> > +    deleteWhenEmpty: true,
>why do you rename?
To make the meaning  clearer ? 
We return a data object containing a *delete* property, *when* the string
received by the ComboBox is *empty*

>Why don't you use a config property?
The idea is to use the config property only for parameters which are mandatory.
It is to make the external interface of the class similar to the DiffStore.js
which has:

 15 /* Config properties:
16  * rstore: A target store to track changes
17  * Only works if rstore has a model and use 'idProperty'
18  */

and this config property is the only mandatory parameter to pass to use the
Diffstore.

> 
> config: {
>   deleteEmpty: true,
>   comboItems: undefined
> },




More information about the pve-devel mailing list