VirtoCommerce/vc-platform

Dictionary items in dynamic property dropdown truncated to 20

j-mok opened this issue · 3 comments

j-mok commented

Description
In the UI, the dropdown list with dynamic property dictionary items is never longer than 20 items.

Current implementation uses the default SearchCriteriaBase.Take value:

$scope.getDictionaryValues = function (property, callback) {
dictionaryItemsApi.query({ id: property.objectType, propertyId: property.id }, callback);
}

[ApiExplorerSettings(IgnoreApi = true)]
[Obsolete("use POST api/platform/dynamic/dictionaryitems/search instead")]
[HttpGet]
[Route("types/{typeName}/properties/{propertyId}/dictionaryitems")]
public async Task<ActionResult<DynamicPropertyDictionaryItem[]>> GetDictionaryItems([FromRoute] string typeName, [FromRoute] string propertyId)
{
var result = await _dynamicPropertyDictionaryItemsSearchService.SearchDictionaryItemsAsync(new DynamicPropertyDictionaryItemSearchCriteria { PropertyId = propertyId, ObjectType = typeName });
return Ok(result.Results);
}

Steps to reproduce

  • Create a dynamic property with >20 items
  • When editing the property for an object you can see only 20 items in the dropdown list

Expected behavior
Any of these:

  • All items are displayed
  • The limit is raised to significantly higher number (100, 1000?)
  • The limit is configurable
  • The dropdown is replaced with some sort of advanced selector (possibly with paging) for high item numbers to avoid an unpractically long list drop (still the threshold should be higher than 20)

Version info:

  • Browser version: any
  • Platform version: current dev, 3.421

Additional context (optional)
Add any other context about the problem here.

OlegoO commented

Fixed in #2706