-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore(app): add hide text option to ModifiedDropdown #1688
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=5cff6c56c0f6bf73fbefe1e033ded21519afcb35 |
@@ -477,7 +484,7 @@ type OptionWithTooltipProps = { | |||
text: string | null; | |||
}; | |||
|
|||
const OptionWithTooltip: React.FC<OptionWithTooltipProps> = ({text}) => { | |||
export const OptionWithTooltip: React.FC<OptionWithTooltipProps> = ({text}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be used in https://github.com/wandb/core/pull/21754
props.text = hideText ? null : ( | ||
<OptionWithTooltip text={opt.text as string} /> | ||
); | ||
return props; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the option to hide the text prop so that we can still search it's value, but only display the JSX label if we'd like
Jira: https://wandb.atlassian.net/browse/WB-18777
Updates the
ModifiedDropdown
component to support hiding the input text prop so that we can display a JSX label as a dropdown option on its own. This will be used in the clone/ create report modal in an upcoming PR, https://github.com/wandb/core/pull/21754.Before:
After:
Screen.Recording.2024-05-29.at.12.48.58.PM.mov