react-component / react-component/tree
switcherIcon not working as expected
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 490
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 5
Description
I want to implenent switcher icon with fontawesome icons but its not working. it still shows the default icons
here is my code,
<Tree
defaultExpandAll={false}
selectable={false}
switcherIcon={(obj) =>
obj.expanded ? (
<i className="fa-solid fa-arrow-down"></i>
) : (
<i className="fa-solid fa-arrow-up"></i>
)
}
>
here is a code sample https://codesandbox.io/s/inspiring-ride-jqnlzo?file=/App.jsx
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with App.jsx in the linked CodeSandbox and inspect the Tree component's switcherIcon entry point. Reproduce the issue, determine why the default icon remains instead of the supplied Font Awesome icons, and consider the issue done when the expanded and collapsed states render the requested icons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100