carbon
carbon copied to clipboard
fix: 15752 invalid tooltip on hovering the select component
Closes #15752
Fixed the invalid title/no title in Select component on hovering
New
-
selectDefaultTitle
which gets select element by it's id. ifdefaultValue
is passed, it gets the option withdefaultValue
from select, otherwise get option by using theselectedIndex
Changed
- To show the valid tooltip replaced select value with option's text by using
selectedIndex
inselect.options
- To show default option's text in title executed the
selectDefaultTitle
inuseEffect
- Added a new test case which is 'should show SelectItem text as title' which renders
Select
withdefaultValue
'Option 2', expected result should be the title 'Option 2'
Testing / Reviewing
- Hover on Select component, it should show the selected Option as tooltip
- If there's no option selected, tooltip should not show
DCO Assistant Lite bot All contributors have signed the DCO.
I have read the DCO document and I hereby sign the DCO.
recheck
Deploy Preview for v11-carbon-react ready!
Built without sensitive environment variables
Name | Link |
---|---|
Latest commit | 397ac8987e98aaced25eaf22ff55abf5e4d91aa3 |
Latest deploy log | https://app.netlify.com/sites/v11-carbon-react/deploys/65eb17f925a73e000844d9b3 |
Deploy Preview | https://deploy-preview-15788--v11-carbon-react.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@alisonjoseph and @guidari, PR is ready for review. Thanks 😊
@mHuzefa Hii :) thank you for contributing, is there a way you can fix the merge conflicts? Thank you!
@guidari Have changed the values to match what you suggested.
@andreancardona I have resolved the merged conflicts although I am sorry that I forgot to rebase my main with upstream and all commits came in this branch so I had to forced push to rewrite the changes. That's why it added other reviewers too.