-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
enhancementNew feature or requestNew feature or requestjiraThis task is referenced in a story of JiraThis task is referenced in a story of Jira
Description
Describe the bug
Dropdowm menu options should fit based on content length.
To Reproduce
Include steps to reproduce the behaviour.
() => {
const selectOption = (value) => {
console.log(value);
};
const options = [
{
value: 1,
label: "Android",
},
];
return (
<DxcInset space="2rem">
<DxcDropdown
icon={<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><path d="M64 360c30.9 0 56 25.1 56 56s-25.1 56-56 56s-56-25.1-56-56s25.1-56 56-56zm0-160c30.9 0 56 25.1 56 56s-25.1 56-56 56s-56-25.1-56-56s25.1-56 56-56zM120 96c0 30.9-25.1 56-56 56S8 126.9 8 96S33.1 40 64 40s56 25.1 56 56z"/></svg>}
caretHidden={true}
options={options}
onSelectOption={selectOption}
size="small"
padding="xxsmall"
></DxcDropdown>
</DxcInset>
);
}Example:
- Create a new React App using
create-react-app. - Install the
@dxc-technology\halstack-reactdependencies and run the app. - Click on '...'.
- Scroll down to '...'.
- See the error.
Expected behaviour

https://codesandbox.io/s/dropdown-432qn0?file=/index.html
Screenshots
If applicable, add screenshots to help explain your problem.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestjiraThis task is referenced in a story of JiraThis task is referenced in a story of Jira
