Blazorise: Autocomplete with some data containing null

Created on 11 Dec 2020  路  8Comments  路  Source: stsrki/Blazorise

Using the 9.3.1 Autocomplete with TValue and TItem crashes when having a certain amount of data. Typing a search with only 6 items in Data works but having 331 items crashes using the same DataGrid and Autocomplete.

  1. Create a gird a custom filtertemplete using autocomplete
  2. Fill the same grid with the same data just different amount of data
  3. Try any filter

On 9.2 it worked like a charm with "huge" data.

image
image
image

All 8 comments

Can you provide us with a sample project to reproduce the issue?

Also, are you using latest 0.9.3-preview3.1?

Yes I am using the latest preview 3.1.

Unfortunately this it not possible since it has confidential data. But let me have a look into this if it is possibel for me to create a sample projec with the same error.

I'm aware you can't post a real project. We just need a small fully working project with the error to reproduce.

Yes I am doing that right now.

Can it be because not every item in the grid has a value in the description? Because every other column works and has a value for each item.

Edit: nope thats not the issue still searching.

After further testing, it does seem to be the issue.

Sample Porject

image

Comment or uncomment this section and try it.

Can be fixed by changing this:
TextField="@((item)=>item.Name.ToString())" ValueField="@((item)=>item.Name)"
to this
TextField="@((item)=>item.Name.ToString() ?? "")" ValueField="@((item)=>item.Name ?? "")"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brettwinters picture brettwinters  路  4Comments

tamunaKap picture tamunaKap  路  6Comments

robalexclark picture robalexclark  路  4Comments

danlbb picture danlbb  路  4Comments

stsrki picture stsrki  路  3Comments