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

[HxInputBase] Unable to control id attribute for input-components #843

Open
hakenr opened this issue Jun 27, 2024 · 0 comments
Open

[HxInputBase] Unable to control id attribute for input-components #843

hakenr opened this issue Jun 27, 2024 · 0 comments
Milestone

Comments

@hakenr
Copy link
Member

hakenr commented Jun 27, 2024

Currently, there's no way to control the id attribute for input. The protected InputId { get; private set; } property is set to a random (GUID-based) ID by the EnsureInputId() method, which is called only when the Label is rendered.

When there is no Label, no id is rendered. There is no way to set your own id, and the id from AdditionalAttributes is ignored (even if InputId is not set). Some derived components with complex structures (such as InputDate) have different logic for handling the id.

If it turns out that the id should be controllable, we should consolidate the related logic. (We should probably respect the id set from InputBase.AdditionalAttributes?)

@hakenr hakenr added this to the Backlog milestone Jun 27, 2024
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

1 participant