Selection options not being set unless previously viewed grid is set
#CTCTOWALTZ-2529
@@ -129,16 +129,18 @@ function controller($scope, serviceBroker, localStorageService) {
vm.$onChanges = () => {
- const lastUsedGridId = localStorageService.get(localStorageKey);
+ if (vm.parentEntityRef) {
- if (!vm.parentEntityRef) return;
+ vm.selectionOptions = mkSelectionOptions(vm.parentEntityRef);
+ const lastUsedGridId = localStorageService.get(localStorageKey);
if (lastUsedGridId) {
vm.gridId = lastUsedGridId;
- vm.selectionOptions = mkSelectionOptions(vm.parentEntityRef);
vm.loading = true;
loadGridData();
}
+
+ }
};
vm.onGridSelect = (grid) => {
