plantain-00 / tree-component

A reactjs and vuejs tree component.
MIT License
146 stars 32 forks source link

Custom icon doesn't override the built in icon; instead it shows both? #12

Closed talismax closed 6 years ago

talismax commented 6 years ago

Maybe I'm doing something stupid. I'm using the latest targeting Vue and debugging with Chrome latest.

I trying to use the fontawesome folder icon:

icon: "fa fa-folder-o",

When I do I see this: image

I looked through the source and I see that the custom icon class is only added to the built in icon classes, rather than replacing them. Not sure how this is supposed to work.

When I inspect the element I see this: image

Thanks!

plantain-00 commented 6 years ago

The reason is .tree-themeicon has a default background-image, but fa fa-folder-o didn't override background-image, so they are all visible, you can override background-image by:

.fa {
    background-image: none !important;
}
plantain-00 commented 6 years ago

v5.2.1 should fix this without above css override.

talismax commented 6 years ago

Thanks very much!