Compare commits
2 Commits
dfa94cd1d9
...
ed11051820
| Author | SHA1 | Date |
|---|---|---|
|
|
ed11051820 | |
|
|
bec9e1be14 |
|
|
@ -22,6 +22,21 @@ namespace AyCode.Blazor.Components.Services
|
|||
// _signalRDataSource = signalRDataSource;
|
||||
// }
|
||||
|
||||
// public override Task<IList<GridCustomDataSourceGroupInfo>> GetGroupInfoAsync(GridCustomDataSourceGroupingOptions options, CancellationToken cancellationToken)
|
||||
// {
|
||||
// return base.GetGroupInfoAsync(options, cancellationToken);
|
||||
// }
|
||||
|
||||
// public override Task<IList> GetTotalSummaryAsync(GridCustomDataSourceTotalSummaryOptions options, CancellationToken cancellationToken)
|
||||
// {
|
||||
// return base.GetTotalSummaryAsync(options, cancellationToken);
|
||||
// }
|
||||
|
||||
// public override Task<object[]> GetUniqueValuesAsync(GridCustomDataSourceUniqueValuesOptions options, CancellationToken cancellationToken)
|
||||
// {
|
||||
// return base.GetUniqueValuesAsync(options, cancellationToken);
|
||||
// }
|
||||
|
||||
// public override async Task<int> GetItemCountAsync(GridCustomDataSourceCountOptions options, CancellationToken cancellationToken)
|
||||
// {
|
||||
// return await ApplyFiltering(options.FilterCriteria, _signalRDataSource.For<T>()).Count().FindScalarAsync<int>(cancellationToken);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace AyCode.Blazor.Components.Services
|
|||
protected List<T> InnerList = []; //TODO: Dictionary??? - J.
|
||||
protected readonly ChangeTracking<T> TrackingItems = new();
|
||||
|
||||
public List<Guid>? ContextIds;
|
||||
public object[]? ContextIds;
|
||||
public string? FilterText { get; set; }
|
||||
|
||||
public AcSignalRClientBase SignalRClient;
|
||||
|
|
@ -106,9 +106,10 @@ namespace AyCode.Blazor.Components.Services
|
|||
public Func<ItemChangedEventArgs<T>, Task>? OnDataSourceItemChanged;
|
||||
public Func<Task>? OnDataSourceLoaded;
|
||||
|
||||
public AcSignalRDataSource(AcSignalRClientBase signalRClient, SignalRCrudTags signalRCrudTags, IEnumerable<Guid>? contextIds = null)
|
||||
public AcSignalRDataSource(AcSignalRClientBase signalRClient, SignalRCrudTags signalRCrudTags, object[]? contextIds = null)
|
||||
{
|
||||
if (contextIds != null) (ContextIds = new List<Guid>()).AddRange(contextIds);
|
||||
//if (contextIds != null) (ContextIds = new List<object>()).AddRange(contextIds);
|
||||
ContextIds = contextIds;
|
||||
|
||||
SignalRCrudTags = signalRCrudTags;
|
||||
SignalRClient = signalRClient;
|
||||
|
|
@ -121,7 +122,7 @@ namespace AyCode.Blazor.Components.Services
|
|||
private object[]? GetContextParams()
|
||||
{
|
||||
var parameters = new List<object>();
|
||||
if (ContextIds != null) parameters.AddRange(ContextIds.Cast<object>());
|
||||
if (ContextIds != null) parameters.AddRange(ContextIds);
|
||||
if (FilterText != null) parameters.Add(FilterText); //Az empty string-et beletesszük, h legyen paraméter! - J.
|
||||
|
||||
if (parameters.Count == 0) parameters = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue