{"id":25835989,"url":"https://github.com/bugsplat-git/ngb-filterable-dropdown","last_synced_at":"2025-03-01T01:38:48.033Z","repository":{"id":42063388,"uuid":"248866960","full_name":"BugSplat-Git/ngb-filterable-dropdown","owner":"BugSplat-Git","description":"⚡️🥾🔌 Powerful ng-bootstrap dropdown control for complicated filtering.","archived":false,"fork":false,"pushed_at":"2025-02-13T22:20:48.000Z","size":3630,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-13T22:32:41.730Z","etag":null,"topics":["angular","bootstrap","bugsplat","dropdown","filter","ng-bootstrap"],"latest_commit_sha":null,"homepage":"https://bugsplat-git.github.io/ngb-filterable-dropdown-example","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BugSplat-Git.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-20T22:51:19.000Z","updated_at":"2025-01-20T23:10:13.000Z","dependencies_parsed_at":"2024-07-19T03:15:27.326Z","dependency_job_id":"978c2e84-69ea-49c9-8a86-b151ca414bd5","html_url":"https://github.com/BugSplat-Git/ngb-filterable-dropdown","commit_stats":{"total_commits":142,"total_committers":7,"mean_commits":"20.285714285714285","dds":0.2535211267605634,"last_synced_commit":"59a84147f2395753fc6b64e67f574e7e2eff85b7"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fngb-filterable-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fngb-filterable-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fngb-filterable-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fngb-filterable-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BugSplat-Git","download_url":"https://codeload.github.com/BugSplat-Git/ngb-filterable-dropdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241304302,"owners_count":19941100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","bootstrap","bugsplat","dropdown","filter","ng-bootstrap"],"created_at":"2025-03-01T01:38:47.464Z","updated_at":"2025-03-01T01:38:48.024Z","avatar_url":"https://github.com/BugSplat-Git.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![bugsplat-github-banner-basic-outline](https://user-images.githubusercontent.com/20464226/149019306-3186103c-5315-4dad-a499-4fd1df408475.png)](https://bugsplat.com)\n\u003cbr/\u003e\n# \u003cdiv align=\"center\"\u003eBugSplat\u003c/div\u003e \n### **\u003cdiv align=\"center\"\u003eCrash and error reporting built for busy developers.\u003c/div\u003e**\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://twitter.com/BugSplatCo\"\u003e\n        \u003cimg alt=\"Follow @bugsplatco on Twitter\" src=\"https://img.shields.io/twitter/follow/bugsplatco?label=Follow%20BugSplat\u0026style=social\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/K4KjjRV5ve\"\u003e\n        \u003cimg alt=\"Join BugSplat on Discord\" src=\"https://img.shields.io/discord/664965194799251487?label=Join%20Discord\u0026logo=Discord\u0026style=social\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n## 👋 Introduction\n\nBugSplat's [@bugsplat/ngb-filterable-dropdown](https://www.npmjs.com/package/@bugsplat/ngb-filterable-dropdown) package provides a powerful dropdown control for complicated filtering. Take a peek our [example](https://bugsplat-git.github.io/ngb-filterable-dropdown-example/) that demonstrates how to filter and select various items in a collection.\n\n## 🏗 Installation\n\nInstall `@bugsplat/ngb-filterable-dropdown` and the associated peer dependencies [@bugsplat/ng-bootstrap](https://ng-bootstrap.github.io/#/home) and [Bootstrap](https://getbootstrap.com/):\n\n`npm i @bugsplat/ngb-filterable-dropdown @bugsplat/ng-bootstrap bootstrap`\n\n## 🏃 Usage\n\nAdd `NgbFilterableDropdownModule` to your `NgModule` imports for each module where you plan to use the filterable dropdown:\n\n```ts\nimport { NgbFilterableDropdownModule } from '@bugsplat/ngb-filterable-dropdown'\n\n@NgModule({\n  ...\n  imports: [\n    NgbFilterableDropdownModule\n  ],\n  ...\n})\n```\n\nAdd `ngb-filterable-dropdown` to your component's template:\n\n```html\n\u003cngb-filterable-dropdown\n  [allowCreateItem]=\"allowCreateItem\"\n  [autoClose]=\"autoClose\"\n  [items]=\"items\"\n  [disabled]=\"disabled\"\n  [placeholder]=\"placeholder\"\n  [searchInputPlaceholder]=\"searchInputPlaceholder\"\n  [selection]=\"selection\"\n  [selectionMode]=\"selectionMode\"\n  (itemCreated)=\"onItemCreated($event)\"\n  (openChanged)=\"onOpenChanged($event)\"\n  (selectionChanged)=\"onSelectionChanged($event)\"\n\u003e\n\u003c/ngb-filterable-dropdown\u003e\n```\n\n## 🧩 API\n\nCustomize your dropdown by leveraging the inputs and outputs of `@bugsplat/ngb-filterable-dropdown` as described below.\n\n### Selection\n\nThe component takes two main inputs, a list of strings that are selectable and a sub-list of strings that are already selected.\n\n```ts\nitems: Array\u003cstring\u003e = ['Beetle', 'Ant', 'Moth', 'Fire Ant', 'Dung Beetle', 'Grass Ant'];\nselection: Array\u003cstring\u003e = ['Moth'];\n```\n\n### Selection Modes\n\nYou can also specify whether or not to allow multiple items to be selected. By default, the component allows one item to be selected.\n\n```ts\nselectionMode: NgbFilterableDropdownSelectionMode =\n  NgbFilterableDropdownSelectionMode.SingleSelect;\n```\n\n### Create New Items\n\nYou can specify whether or not to allow new items to be created. By default, the component does not allow new items to be created.\n\n```ts\nallowCreateItem: boolean = false;\n```\n\n### Opening and Closing\n\nThe open/close behavior of the dialog can be changed by setting `autoClose` to `true` or `false`. Alternatively you can specify whether to close on an `outside` or `inside` click. \n\n```ts\nautoClose: boolean | 'inside' | 'outside' = false;\n```\n\n### Disabling\n\nDropdowns can be disabled at any time by setting `disabled` to `true`.\n\n```ts\ndisabled: boolean = false;\n```\n\n### Loading\n\nYou can also display a loading placeholder by setting `loading` to `true`.\n\n```ts\nloading: boolean = false;\n```\n\n### Placeholders\n\nIf you'd like to specify the placeholder in the search input you can set the value of searchInputPlaceholder to a string of your choosing.\n\n```ts\nplaceholder: string = 'No Items Selected';\nsearchInputPlaceholder: string = 'Search';\n```\n\n### Outputs\n\nThe component provides the selected data back to the parent through the selectionChanged event.\n\n```ts\nonSelectionChanged(event: SelectionChangedEvent) {\n  const selection = event.selection;\n}\n```\n\nWhen an item is created the component outputs an event with the properties created, items, and selection.\n\n```ts\nonItemCreated(event: ItemCreatedEvent) {\n  const created = event.created;\n  const selection = event.selection;\n  const items = event.items;\n}\n```\n\nThe component also provides an event when the dropdown is opened or closed through the openChanged event.\n\n```ts\nonOpenChanged(event: OpenChangedEvent) {\n  const open = event.open;\n}\n```\n## 🐛 About\n\n[@bugsplat/ngb-filterable-dropdown](https://github.com/BugSplat-git/ngb-filterable-dropdown) is an open source library developed by [BugSplat](https://www.bugsplat.com/)! BugSplat is a crash and error reporting tool used by developers to find, fix, and track errors in their applications.\n\nIf you're interested in error reporting, check out our [Angular](https://www.bugsplat.com/docs/sdk/angular/) integration.\n\nWith :heart:  \nBugSplat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fngb-filterable-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugsplat-git%2Fngb-filterable-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fngb-filterable-dropdown/lists"}