Skip to content

feat(mat-select): Improve mat-select harness DX #26986

Open
@behzadmehrabi

Description

@behzadmehrabi

Feature Description

Currently, when using matSelectHarness.getOptions(), an empty array is returned if the matSelectHarness.open() method is not called beforehand. This can be confusing for users, who may not realize they need to call matSelectHarness.open() first.

To improve the user experience, I suggest adding an error message similar to what is done in matAutoCompleteHarness, so that if getOptions() is called before open(), an error will be thrown informing the user to call open() first.

This change would save users time and frustration by providing immediate feedback on what they need to do to correctly use the getOptions() method.

matAutoComplete implementation:

I can make a PR for it :)

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/selectfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions