Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CB-6286 add className prop #3297

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from
Open

Conversation

devnaumov
Copy link
Member

No description provided.

@devnaumov devnaumov marked this pull request as ready for review March 3, 2025 11:00
sergeyteleshev
sergeyteleshev previously approved these changes Mar 3, 2025
Comment on lines 18 to 26
forwardRef(function NodeControl({ nodeId, className }, ref) {
const data = useContext(TreeDataContext)!;
const tree = useContext(TreeContext)!;

const node = data.getNode(nodeId);
const height = tree.getNodeHeight(nodeId);

return (
<TreeNodeControl ref={ref} style={{ height }}>
<TreeNodeControl className={className} ref={ref} style={{ height }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the inner tree component. It's not supposed to be used directly. It's meant to be easily re-implemented for customization.

<TreeNodeName title={node.tooltip}>{node.name}</TreeNodeName>
<TreeNodeName title={node.tooltip ?? node.name}>{node.name}</TreeNodeName>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this we can keep

@devnaumov devnaumov requested a review from Wroud March 4, 2025 21:19
Wroud
Wroud previously approved these changes Mar 5, 2025
@devnaumov devnaumov requested a review from Wroud March 5, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants