jyoketsu / tree-graph-react

Tree graph for React / React Tree Diagram Component
https://jyoketsu.github.io/tree-graph-react/
MIT License
26 stars 5 forks source link

backgroundColor behaviour #8

Closed mgaudin closed 2 weeks ago

mgaudin commented 2 weeks ago

Hello,

Thank you for this project!

I'm using Tree for a project and am trying to style it, but for some reason, the backgroundColor styling behaves strangely. The node displays as grey despite setting a specific background color. However, when selected, the correct color appears in the background (as if backgroundColor is acting like selectedBackgroundColor).

Capture d'écran 2024-10-29 113439 Capture d'écran 2024-10-29 113502

Do you have any idea how I can address this issue?

Thank you!

{ "001": { "_key": "001", "name": "Alpha", "backgroundColor": "#313B72", "father": "", "sortList": ["002", "003", "004"] }, "002": { "_key": "002", "name": "1. Element", "color": "#FFFFFF", "backgroundColor": "#FF8C42", "father": "001", "sortList": ["005", "006"] }, "003": { "_key": "003", "name": "2. Element", "color": "#ffffff", "backgroundColor": "#FF8C42", "father": "001", "sortList": ["007", "008"] }, "004": { "_key": "004", "name": "3. Element", "color": "#ffffff", "backgroundColor": "#FF8C42", "father": "001", "sortList": ["009", "010"] }, "005": { "_key": "005", "name": "1.1. Element", "backgroundColor": "#FCAF58", "father": "002", "sortList": ["011"] }, "006": { "_key": "006", "name": "1.2. Element", "backgroundColor": "#FCAF58", "father": "002", "sortList": [] }, "007": { "_key": "007", "name": "2.1. Element", "backgroundColor": "#FCAF58", "father": "003", "sortList": [] }, "008": { "_key": "008", "name": "2.2. Element", "backgroundColor": "#FCAF58", "father": "003", "sortList": [] }, "009": { "_key": "009", "name": "3.1. Element", "backgroundColor": "#FCAF58", "father": "004", "sortList": [] }, "010": { "_key": "010", "name": "3.2. Element", "backgroundColor": "#FCAF58", "father": "004", "sortList": [] }, "011": { "_key": "011", "name": "1.1.1. Element", "backgroundColor": "#F9C784", "father": "005", "sortList": ["012"] }, "012": { "_key": "012", "name": "1.1.1.1. Element", "backgroundColor": "#FFFFFF", "father": "011", "sortList": [] } }

jyoketsu commented 2 weeks ago

Thank you for the feedback, this was a bug, and it has now been fixed. image image