[pve-devel] [PATCH manager 2/2] fix combogrid multiselect bug

Dominik Csapak d.csapak at proxmox.com
Tue Apr 26 12:50:50 CEST 2016


Yes, it really is not a nice fix, but it was a fix with minimal impact 
on other parts of our logic.
I talked with Emmanuel about the Picker based implementation, and the reason
we did not use this, was that we would have to reimplement many things 
which are already in the combobox,
with not much benefit.

The real problem here is, that we set values in field, whose stores are 
not yet loaded.
I have an alternative fix here which changes the behaviour of our edit 
window and inputpanel,
so that it waits for the store loads.

this is a more "correct" fix, but potentially impacts every field which 
has a backing store

should i send it, or do you have a better idea?
(other possibilities would be to override the setvalue function,
to manually check if a "," is in the value after loading it, etc.. but 
those are all
equally ugly and dangerous)

On 04/26/2016 12:00 PM, Dietmar Maurer wrote:
> I can see the problem, but I do not plan to include such
> clumsy workarounds. We need to find a better solutions...
>
> Already looked at the Picker based Combogrid implementation?
>
>
>>       valueField: 'node',
>> -    displayField: 'node',
>> +    displayField: 'nodename',
>>       store: {
>> -	    fields: [ 'node', 'cpu', 'maxcpu', 'mem', 'maxmem', 'uptime' ],
>> +	    fields: [ 'node', 'cpu', 'maxcpu', 'mem', 'maxmem', 'uptime',
>> +		{
>> +		    name: 'nodename',
>> +		    calculate: function(data) {
>> +			return data.node;
>> +		}
>> +	    } ],





More information about the pve-devel mailing list