Sha256: d682f95dc948207f0860e7c81b3d12f92f78d00b49344dc9c1d5cc40677c2eb5

Contents?: true

Size: 289 Bytes

Versions: 84

Compression:

Stored size: 289 Bytes

Contents

import { pickBy } from 'lodash';

export const filterAccounts = (accounts, filterTerm) => {
  if (!filterTerm) return accounts;

  const filterTermLowerCased = filterTerm.toLowerCase();
  return pickBy(accounts, (value, key) =>
    key.toLowerCase().includes(filterTermLowerCased)
  );
};

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
foreman_rh_cloud-11.0.3 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.59 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-11.0.2 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-11.0.1 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-11.0.0 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.58 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-10.0.2 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.57 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-10.0.1 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.56 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.55 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.54 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.53 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.52 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-8.0.52 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-9.0.51 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-8.0.51 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-7.0.48 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-7.0.47 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-8.0.50 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js