Skip to content

Generic select not work #61

@kamazheng

Description

@kamazheng

I am using V2.5, cannot find AddSelectField extension method, using:

        var formConfig = FormBuilder<Milestone>.Create()
            .AddField(x => x.OperationGroupId, f =>
                f.WithLabel(PropertyExtentions.GetDisplayLabel<Milestone>(p => p.OperationGroup))
                .WithOptions(opSelect))


    private async Task<(int value, string label)[]> GetOperationGroups()
    {
        var op = await _httpClientService.GetRecordsAsync<OperationGroup>();
        return op.Select(p => new { value = p.Id, label = p.Name })
                 .Select(x => (x.value, x.label))
                 .ToArray();
    }

The int value not work (int value, string label) / always return 0, only string value works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions