Skip to content

Change event trigger method should correctly convert input value to string #276

@egil

Description

@egil

When a onchange event is triggered on e.g. a <select> or <input> that is bound to a value which is not of type string, users expect to be able to call the cut.Find("elm").Change(myValue) and have their event handler triggered.

However, it seems as if Blazor always expect to receive a string, which it will then convert to the appropriate type the element is bound to, which forces users to trigger their event handler like so: cut.Find("elm").Change(myValue.ToString()).

It would be better if this was handled by bUnit. We need to be aware of certain types, such as DateTime, where a naive use of ToString() might not be work.

Related: #275 (comment)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthigh-priorityIssues that should be looked at before others.input neededWhen an issue requires input or suggestions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions