Replies: 2 comments 4 replies
-
Did you already tried to use the |
Beta Was this translation helpful? Give feedback.
4 replies
-
This is not an issue. Converted to discussion item and fixed the title 😉 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a form for editing an object with an Int property, this property describes a Foreign Key in the database so it expects an int ID value from another list of objects. IE:
class FormItem
{
public int FK_ID { get;set;}
}
class ListItem
{
public int Id {get;set; }
public string Label { get;set;}
}
my blazor component has a FluentSelect:
<FluentSelect name="ItemSelect" TOption="ListItem" Items="SelectItems" OptionValue="@(i => i.Id)" OptionText="@(i => i.Label)" @bind-Value="@Content.FK_ID " Label="Select Item" Required/>
@code {
public FormItem Content { get;set; }
public List SelectItems { get;set; }
}
When using the above, the compiler complains: cannot convert 'int' to 'string' on the bind-Value parameter and OptionValue. What is the best approach to wire this up correctly?
I am not able to change the model for FormItem and ListItem as they are provided by an external API that I have no control over.
Beta Was this translation helpful? Give feedback.
All reactions