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

Dropdown component doesn't allow data-testid attribute to persist #203

Open
Matt-at-Hyland opened this issue Jan 7, 2025 · 1 comment
Open

Comments

@Matt-at-Hyland
Copy link

Matt-at-Hyland commented Jan 7, 2025

This occurs while creating a custom Widget using Experience Builder version 1.16.

Using the following UI components

<Dropdown>
	<Tooltip title="Title of Dropdown">
		<DropdownButton
			icon
			onClick={function noRefCheck() { }}
			data-testid="DesiredDataTestId"
		>
			<PersonFilled size="25" />
		</DropdownButton>
	</Tooltip>
	<DropdownMenu >
		<DropdownItem>
			Menu Item 1
		</DropdownItem>
	</DropdownMenu>
</Dropdown>

Results in the HTML output of:

<button data-testid="dropdownBtn" aria-haspopup="menu" aria-expanded="false" class="btn jimu-btn jimu-dropdown-button ...

Where the data-testid ends up as dropdownBtn instead of DesiredDataTestId

@fishNimo
Copy link

fishNimo commented Jan 7, 2025

Thanks @Matt-at-Hyland. The prop['data-testid'] is overwritten by the fixed value 'dropdownBtn' ​​of the component itself. We will fix it in the next release.

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

No branches or pull requests

2 participants