0

每当我为 MudBlazor 的自动完成键入字符串时,组件都不会给我结果。我可以获取自动完成组件中的所有数据,但无法搜索它。

剃须刀.cs

private PropertyTransactionType _sPropertyTransactionType;
        private PropertyTransactionType SPropertyTransactionType
        {
            get => _sPropertyTransactionType;
            set
            {
                _sPropertyTransactionType = value;
            }
        }
 private async Task<IEnumerable<PropertyTransactionType>> Search(string value)
        {
            return PropertyTransactionTypes;
        }

剃刀

<MudAutocomplete T="ascor_pmis.Shared.Entities.Properties.Parameters.PropertyTransactionType" 
                                                     Label="Transaction Type" 
                                                     @bind-Value="SPropertyTransactionType"
                                                     SearchFunc="@Search"
                                                     ToStringFunc="@(e=> e==null?null : $"{e.TransactionType} [{e.Debit_Credit}]")" />
4

0 回答 0