Skip to content

Select id native props 2 #213

@Thorekt

Description

@Thorekt

Hi,

After the correction in #212 the bug seems still here, i saw your modification but it's override by the "selectId" comming after

const id = useAnalyticsId({
    "defaultIdPrefix": "fr-select-group",
    "explicitlyProvidedId": id_props ?? nativeSelectProps.id
});

const selectId = `select-${useId()}`;

the select element use "selectId" :

<select
    {...nativeSelectProps}
    className={cx(fr.cx("fr-select"), nativeSelectProps.className)}
    id={selectId}
    aria-describedby={stateDescriptionId}
    disabled={disabled}
>    
   {children}
</select>

I think the id in "nativeSelectProps" is overide by the id using "selectId"

Thanx for your reactivity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions