Am 12.12.25 um 08:44 schrieb Dominik Csapak:
> to optimize the rendering to the dom, only fire the 'refresh' event of
> the store at the end of the updateTree method when either:
> 
> * an element changed it's relevant data
> * something moved
> * a new element was inserted
> * an element was removed
> 
> We also need to refresh the store when the UI options are reloaded, so
> the tags get the correct color.
> 
> Signed-off-by: Dominik Csapak <[email protected]>
> ---
> no changes in v2
> 
>  www/manager6/tree/ResourceTree.js | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/tree/ResourceTree.js 
> b/www/manager6/tree/ResourceTree.js
> index b0e094f1..8612269b 100644
> --- a/www/manager6/tree/ResourceTree.js
> +++ b/www/manager6/tree/ResourceTree.js
> @@ -354,6 +354,7 @@ Ext.define('PVE.tree.ResourceTree', {
>          let updateTree = function () {
>              store.suspendEvents();
>  
> +            let any_changed = false;

existing style in this module is already rather mixed, so really not a big 
style issue,
but would be still nice to prefer camelCase as per our [JS style guide]. Also 
here,
would probably fixed that just up, but due to replying to patch 1/2 anyway I 
figured
it doesn't hurt to notice this nit.

JS style guide: https://pve.proxmox.com/wiki/Javascript_Style_Guide#Casing

>              let rootnode;
>              if (firstUpdate) {
>                  rootnode = Ext.create('PVETree', {



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to