0
dlapointe created
- ABP Framework version: 6.0.0-rc.4
- UI type:MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
Hi,
The <abp-select> should be adding an empty SelectListItem if the field is not required (as per the doc) but it doesnt

Here is the viewmodel, you can see that TechnicianId is nullable
public class AssignInfoViewModel
{
[Required]
public Guid Id { get; set; }
[Required]
public Guid InstrumentId { get; set; }
public Guid? TechnicianId { get; set; }
[Required]
public int Duration { get; set; }
}
Here is the view :
<abp-select asp-for="Info.TechnicianId" asp-items="Model.TechnicianLookupListRequired" label="@L["Technician"].Value" />
And here is the output, as you can see, there is no empty options so the user 'have' to select something even tough its a nullable property :

Thank you
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
4 Answer(s)
-
0
hi
I will check this, You can add an option now.
<abp-select asp-for="Info.TechnicianId" asp-items="Model.TechnicianLookupListRequired" label="@L["Technician"].Value" > <option value="">Choose a Technician</option> </abp-select>Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Ok thanks, ill add it.
Just to be sure i understand correctly, if the issue we do submit is marked as an actual bug and not a wrong config / usage, we get our 'credit' back, right?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
