My ultimate goal is to implement this new property in Frontend-infra's InputLocalized component to set the z-index to dropdown.
I was trying to implement a test like that:
it("renders with menu element attributes", () => {
const {container} = render(
<ClayLocalizedInput
id="locale1"
locales={locales}
menuElementAttrs={{className: 'custom-class'}}
onSelectedLocaleChange={() => {}}
onTranslationsChange={() => {}}
selectedLocale={locales[0]!}
spritemap="/path/to/svg"
translations={{
'en-US': 'Apple',
'es-ES': 'Manzana',
}}
/>
);
fireEvent.click(
container.querySelector('.dropdown-toggle') as HTMLButtonElement,
{}
);
const dropdownMenu = document.querySelector('.dropdown-menu') as HTMLButtonElement;
expect(dropdownMenu).toHaveClass('custom-class');
But I wasn't successful, my dropdownMenu got a null value and I unfortunately didn't have the necessary time to debug. But I hope everything is ok with the contribution.
Hey team, my goal here is to be able to use menuElementAttrs thought the Clay Input Localized.
Related issue
My ultimate goal is to implement this new property in Frontend-infra's InputLocalized component to set the z-index to dropdown.
I was trying to implement a test like that:
But I wasn't successful, my
dropdownMenu
got a null value and I unfortunately didn't have the necessary time to debug. But I hope everything is ok with the contribution.