mazdik / ng-mazdik

Angular UI component library
https://mazdik.github.io/ng-mazdik
MIT License
89 stars 34 forks source link

Is there any way resolve Tree Checkbox Selection Issue on collapse / expand #31

Closed suryakanta101 closed 5 years ago

suryakanta101 commented 5 years ago

image

When we are check Tree Checkbox and then Collapse -> Expand again, the previous selection is not there. But the selection showing in CSS UI

mazdik commented 5 years ago

You can customize the table by example: demo source demo: tree table add checkbox selection, icon node

but not work lazy loading nodes I will make a separate component later

suryakanta101 commented 5 years ago

image

With selectionMultiple: true, selectionMode: 'checkbox',

Selection All is working fine, but when we "uncheck" the Tree node, it should uncheck children nodes as well. What config do we need here?

suryakanta101 commented 5 years ago

Also, there seems to be a UI issue , if not mistaken. After a collapse here, if there is scroll down, it is a slight visible data looks something hiding.

image

mazdik commented 5 years ago

look at the last commit, there were more folder icons

suryakanta101 commented 5 years ago

I think this is not about the folder icons. It seems the Rows are hidden and merged . See the image below.

After a row collapse , the hidden rows are visible below.

image

suryakanta101 commented 5 years ago

.datatable-body-row, .datatable-header-row { display: -webkit-box; position: relative; }

following css code changes making the above issue fixed.

suryakanta101 commented 5 years ago

@mazdik Is there any flag , to make initially all Tree Table in collapsed state.

mazdik commented 5 years ago

@mazdik Is there any flag , to make initially all Tree Table in collapsed state.

in prepareTreeData:

    rows.forEach(x => {
      x.$$height = (x.$$level > 1) ? 0 : null;
      x.expanded = !(x.$$level > 0);
    });
mazdik commented 5 years ago

.datatable-body-row, .datatable-header-row { display: -webkit-box; position: relative; }

following css code changes making the above issue fixed.

is old 2009 version of Flexbox “Old” Flexbox and “New” Flexbox

.datatable-body-row[style*="height: 0"] {
  overflow-y: hidden; /* or display: none; */
}