ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

feat(ionLabel): Add prop to specify 'for' value

Open Wahsner opened this issue 1 year ago • 1 comments

Prerequisites

Describe the Feature Request

To be able to specify the 'for' on the ionLabel to have greater control over the field the ionLabel should target/focus.

Describe the Use Case

Enables the use of standard ionic form components and decouples the ionLabel from needing to be wrapped in an ionItem in order for the label to target the form field.

Describe Preferred Solution

No response

Describe Alternatives

Alternatively, update all form components to pass the id to the shadow DOM element so they become targetable via the standard label element.

Related Code

No response

Additional Information

I have been unable to find a suitable, scalable solution to this issue.

Wahsner avatar Jul 29 '22 06:07 Wahsner

Thanks for the issue. We have an alternative proposal here which should accomplish the same goal: https://github.com/ionic-team/ionic-framework/discussions/25661

Can you give this a look and let me know if it works for your use case?

liamdebeasi avatar Aug 01 '22 13:08 liamdebeasi

Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

ionitron-bot[bot] avatar Aug 15 '22 13:08 ionitron-bot[bot]