salesforce / salesforce/design-system-react

Tooltip Add portal parentSelector prop

Open
#2,156 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tooltip
Dominant language
JavaScript
Stars
982
Forks
440
Avg merge
1d 21h
Merged PRs (30d)
4

Description

I was trying to render Tooltip and was not able to set portal container for it to render in.
For Modal component we have something like parentSelector={} prop.

For Tooltip that is using Dialog component then we don't have any prop or ability to define portal container.

i found only portalMount prop on Dialog, but it is not passing to it from Tooltip component.

Can you advice is it possible to render tooltip somewhere not to body, and how ? If not can you enhance Tooltip, so it will pass portalMount to Dialog ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Tooltip and Dialog components, then trace how Dialog's existing portalMount prop is handled and whether Tooltip exposes an equivalent setting. Done means Tooltip can configure a portal container other than document.body, with the behavior confirmed in the relevant component tests if they are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.