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

SearchFunc has incorrect signature #6612

Closed
1 of 2 tasks
Apollo3zehn opened this issue Apr 9, 2023 · 2 comments
Closed
1 of 2 tasks

SearchFunc has incorrect signature #6612

Apollo3zehn opened this issue Apr 9, 2023 · 2 comments
Labels
answered Topic has been answered

Comments

@Apollo3zehn
Copy link

Apollo3zehn commented Apr 9, 2023

Bug type

Component

Component name

MudAutocomplete<string?>

What happened?

I get a null reference exception when the SearchFunc is called if I bind the MudAutocomplete to a nullable field of type string?. This was not expected as the signature of SearchFunc is Func<string, Task<IEnumerable<string?>>>, i.e. the incoming string is not null.

Expected behavior

I expect the signature to be Func<string?, Task<IEnumerable<string?>>> when binding to a field of type string?.

Reproduction link

https://try.mudblazor.com/snippet/GawRYIYNSFRkgTAR

Reproduction steps

Click into the AutoComplete field. The result will be displayed as Is search string null after click? True.

Relevant log output

No response

Version (bug)

6.2.0

Version (working)

No response

What browsers are you seeing the problem on?

Microsoft Edge

On what operating system are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ScarletKuro
Copy link
Member

Hello @Apollo3zehn. At the moment, MudBlazor doesn't support nullable annotations. However, work is currently underway to address this issue. You can track the progress of this work in the following ticket: #6535.

@Apollo3zehn
Copy link
Author

Thank you. I was confused because part of the already existing signature is a string?.

@henon henon added answered Topic has been answered and removed triage labels Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Topic has been answered
Projects
None yet
Development

No branches or pull requests

3 participants