kartik-v / yii2-tree-manager

An advanced tree management module using nested sets for Yii 2.
http://demos.krajee.com/tree-manager
Other
150 stars 107 forks source link

possible bug in css for icons in directory structure #227

Closed attybean closed 5 years ago

attybean commented 5 years ago

Steps to reproduce the issue

  1. composer require version 1.1.1 (upgrading from version 1.08)

Expected behavior and actual behavior

When I follow those steps, I see...

Icons 'open folder, closed folder, parent folder' in the 'directory structure' are showing at the same time. (three icons back to back in front of the file name in the tree)

I was expecting...

only one icon in front of the folder/file and the others hidden

Environment

Browsers

Operating System

Libraries

Isolating the problem

The old kv-tree.css file had this line: (204)

.kv-tree-container .kv-node-closed, .kv-tree-container .kv-node-opened, .kv-tree-container .kv-icon-parent, .kv-node-toggle, .kv-parent >
 .kv-tree-list >
  .kv-node-detail >
   .kv-node-icon.kv-icon-child {
    display: none;
}

The new one does not. So I added it back to my own css file and everything works as expected.

kartik-v commented 5 years ago

The CSS in the updated version already exists in the form of tree wrapper:

.kv-tree-wrapper .kv-node-closed, .kv-tree-wrapper .kv-node-opened, .kv-tree-wrapper .kv-icon-parent,
.kv-node-toggle, .kv-parent > .kv-tree-list > .kv-node-detail > .kv-node-icon.kv-icon-child {
    display: none;
}

Check if you have the latest release of the extension and are running the latest CSS on the browser (ensure browser is not loading from a stale cache and clean cache and restart). Have you overridden the TreeView classes or changed any of the code yourself?

attybean commented 5 years ago

TreeView was extended and the initOptions was missing a few lines. Now it works perfectly without any modifications. Thank you so much for your dedication and hard work. @kartik-v