Skip to content

Commit

Permalink
Fix inventory list timing console errors (#4478)
Browse files Browse the repository at this point in the history
* eeej small files

* guards to prevent console errors

---------

Co-authored-by: Katherine Fleming <[email protected]>
  • Loading branch information
perryr16 and kflemin authored Jan 18, 2024
1 parent 9c719a9 commit acc3198
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions seed/static/seed/js/controllers/inventory_list_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,10 @@ angular.module('BE.seed.controller.inventory_list', []).controller('inventory_li
const findList = {};
for (const elementId of ['filters-list', 'sort-list']) {
findList[elementId] = { attempts: 0 };
const element = document.getElementById(elementId);
if (!element) continue;
findList[elementId].interval = setInterval(() => {
const listInput = document.getElementById(elementId).getElementsByTagName('input')[0];
const listInput = element.getElementsByTagName('input')[0];
if (listInput) {
listInput.readOnly = true;
clearInterval(findList[elementId].interval);
Expand Down Expand Up @@ -1631,7 +1633,7 @@ angular.module('BE.seed.controller.inventory_list', []).controller('inventory_li

$scope.selected_display = '';
$scope.update_selected_display = () => {
if ($scope.gridApi) {
if ($scope.gridApi && $scope.gridApi.grid.gridMenuScope) {
uiGridGridMenuService.removeFromGridMenu($scope.gridApi.grid, 'dynamic-export');
$scope.gridApi.core.addToGridMenu($scope.gridApi.grid, [
{
Expand Down

0 comments on commit acc3198

Please sign in to comment.