Browse Source

Improve entity select component.

pull/919/head
Igor Kulikov 8 years ago
parent
commit
d009009cdf
  1. 6
      ui/src/app/entity/entity-select.directive.js

6
ui/src/app/entity/entity-select.directive.js

@ -32,9 +32,11 @@ export default function EntitySelect($compile, $templateCache, entityService) {
var entityTypes = entityService.prepareAllowedEntityTypesList(scope.allowedEntityTypes, scope.useAliasEntityTypes);
if (entityTypes.length === 1) {
var entityTypeKeys = Object.keys(entityTypes);
if (entityTypeKeys.length === 1) {
scope.displayEntityTypeSelect = false;
scope.defaultEntityType = entityTypes[0];
scope.defaultEntityType = entityTypes[entityTypeKeys[0]];
} else {
scope.displayEntityTypeSelect = true;
}

Loading…
Cancel
Save