From e8ee4a97bd5f68833cfc3033f2c976224a9638c1 Mon Sep 17 00:00:00 2001 From: Ihor Brazhnichenko Date: Tue, 29 Nov 2022 19:42:02 +0200 Subject: [PATCH] #23 Remove table filters for operations-table --- .../operations/operations-table.directive.js | 53 +------------------ 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/app/sections/operations/operations-table.directive.js b/app/sections/operations/operations-table.directive.js index 072e2fd..d8e82f0 100644 --- a/app/sections/operations/operations-table.directive.js +++ b/app/sections/operations/operations-table.directive.js @@ -88,7 +88,7 @@ Use this field show / hide user filters if(!name) return false; return { - value: key, + id: key, name, } }).filter((item) => !!item); @@ -119,45 +119,10 @@ Use this field show / hide user filters // see the issue: https://github.com/blocksights/blocksights-open-explorer/issues/15 $scope.userOpenedFirstPageTime = null; - const filters = [ - $scope.filterByAssetIdEnabled !== false ? { - width: '150px', - defaultValue: '', - placeholder: 'Search by asset', - onChange: (value) => { - $scope.filters.assetIdOrName = value; - $scope.select(1, true); - }, - modelOptions: { - debounce: 500, - getterSetter: true - } - } : null, - $scope.filterByAccountIdEnabled !== false ? { - width: '150px', - defaultValue: '', - placeholder: 'Search by account', - onChange: (value) => { - $scope.filters.accountIdOrName = value; - $scope.select(1, true); - }, - modelOptions: { - debounce: 500, - getterSetter: true - } - } : null, - ].filter((item) => !!item); - $scope.operationsColumns = $scope.columns || [ { title: $filter('translate')('Operation'), index: 'operation_text', - onFilterCancel: () => { - $scope.filters.assetIdOrName = undefined; - $scope.filters.accountIdOrName = undefined; - $scope.select(1, true) - }, - filter: filters.length ? filters : undefined }, { title: $filter('translate')('ID'), @@ -177,22 +142,6 @@ Use this field show / hide user filters title: $filter('translate')('Type'), index: 'type', hidden: ['xs', 'sm', 'md'], - onFilterCancel: () => { - $scope.filters.operationType = '-1'; - $scope.select(1, true) - }, - filter: $scope.filterByOperationTypeEnabled !== false ? [ - { - width: '300px', - placeholder: 'Filter by operation id', - defaultValue: '-1', - onChange: (value) => { - $scope.filters.operationType = value; - $scope.select(1, true); - }, - options: $scope.operationTypes - } - ] : undefined } ];