Hello everyone,
I'm trying to use Contentment DataPicker with my own data, I have this code:
public class TestDataPickerSource : IDataPickerSource
{
public Dictionary<string, object> DefaultValues => default;
public IEnumerable<ConfigurationField> Fields => default;
public string Group => "SSO";
public OverlaySize OverlaySize => OverlaySize.Small;
public string Name => "Test";
public string Description => "testing.";
public string Icon => "icon-umb-users";
public async Task<IEnumerable<DataListItem>> GetItemsAsync(Dictionary<string, object> config, IEnumerable<string> values)
{
var items = new List<DataListItem>();
for (int i = 0; i < 10; i++)
{
items.Add(new DataListItem
{
Name = "name " + i,
Description = "",
Value = (i + 1).ToString(),
});
}
return items;
}
public async Task<PagedResult<DataListItem>> SearchAsync(Dictionary<string, object> config, int pageNumber = 1, int pageSize = 12, string query = "")
{
var items = new PagedResult<DataListItem>(1, pageNumber, pageSize);
return await Task.FromResult(items);
}
}
when I select this as a data source it shows me this error and returns noting:
I followed the documentation, have I missed something?
Contentment datapicker not working
Hello everyone, I'm trying to use Contentment DataPicker with my own data, I have this code:
when I select this as a data source it shows me this error and returns noting:
I followed the documentation, have I missed something?
is working on a reply...