Sha256: 32cfaf08cdd1ba9154889ce6e21fe67e26a9d205234cf89a895c1f5b7d6ef8c3

Contents?: true

Size: 307 Bytes

Versions: 37

Compression:

Stored size: 307 Bytes

Contents

export const filterAccounts = (accounts, accountIds, filterTerm) => {
  if (!filterTerm || !accountIds.length) {
    return accountIds;
  }

  const filterTermLowerCased = filterTerm.toLowerCase();
  return accountIds.filter(id =>
    accounts[id].label.toLowerCase().includes(filterTermLowerCased)
  );
};

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
foreman_rh_cloud-1.0.17 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-2.0.17 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-3.0.17 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-2.0.16 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-1.0.16 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-3.0.16 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-1.0.15 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-2.0.15 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-3.0.15 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-3.0.14 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-2.0.14 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-1.0.14 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-0.9.14 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-0.9.13.1 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-1.0.13.1 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-2.0.13.1 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-0.9.13 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-1.0.13 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-2.0.13 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js