This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
5,060 additions
and
3,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Bump version in: | ||
- package.json | ||
- src/app/ng-select/package.json | ||
- demo/package.json | ||
- demo/src/app/components/home.compenent.ts | ||
|
||
Build with: | ||
```bash | ||
yarn run build-lib | ||
``` | ||
|
||
Publish from dist directory: | ||
```bash | ||
cd src/app/ng-select/dist | ||
npm publish | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
demo/src/app/components/examples/filter-input-changed.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<mat-card> | ||
<mat-card-title> | ||
Filter input changed event | ||
</mat-card-title> | ||
<mat-card-content> | ||
|
||
<h3>Single select</h3> | ||
|
||
<div class="select-value">Search term: {{searchTerm0}}</div> | ||
<ng-select | ||
[options]="characters" | ||
(filterInputChanged)="onFilterInputChanged0($event)"> | ||
</ng-select> | ||
|
||
<div class="code-header">Component template</div> | ||
<section [innerHTML]="html0" highlight-js-content=".highlight"></section> | ||
|
||
<div class="code-header">Component class</div> | ||
<section [innerHTML]="ts0" highlight-js-content=".highlight"></section> | ||
|
||
<h3>Multiple select</h3> | ||
|
||
<p class="select-value">Search term: {{searchTerm1}}</p> | ||
<ng-select | ||
[options]="characters" | ||
[multiple]="true" | ||
(filterInputChanged)="onFilterInputChanged1($event)"> | ||
</ng-select> | ||
|
||
<div class="code-header">Component template</div> | ||
<section [innerHTML]="html1" highlight-js-content=".highlight"></section> | ||
|
||
</mat-card-content> | ||
</mat-card> |
74 changes: 74 additions & 0 deletions
74
demo/src/app/components/examples/filter-input-changed.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import {AfterViewInit, Component, ElementRef} from '@angular/core'; | ||
import {IOption} from 'ng-select'; | ||
declare var hljs: any; | ||
import {OptionService} from '../../services/option.service'; | ||
|
||
@Component({ | ||
selector: 'filter-input-changed', | ||
templateUrl: './filter-input-changed.component.html' | ||
}) | ||
export class FilterInputChanged implements AfterViewInit { | ||
|
||
characters: Array<IOption> = this.optionService.getCharacters(); | ||
searchTerm0: string = ''; | ||
searchTerm1: string = ''; | ||
|
||
constructor( | ||
private elementRef: ElementRef, | ||
private optionService: OptionService | ||
) {} | ||
|
||
onFilterInputChanged0(searchTerm: string) { | ||
this.searchTerm0 = searchTerm; | ||
} | ||
|
||
onFilterInputChanged1(searchTerm: string) { | ||
this.searchTerm1 = searchTerm; | ||
} | ||
|
||
ngAfterViewInit() { | ||
hljs.initHighlighting(); | ||
let nodes: NodeList = this.elementRef | ||
.nativeElement | ||
.querySelectorAll('.typescript, .html, .css'); | ||
|
||
for (let i = 0; i < nodes.length; i++) { | ||
hljs.highlightBlock(nodes[i]); | ||
} | ||
} | ||
|
||
html0: string = ` | ||
<pre><code class="html"><div>Search term: {{searchTerm}}</div> | ||
<ng-select | ||
[options]="characters" | ||
(filterInputChanged)="onFilterInputChanged($event)"> | ||
</ng-select> | ||
</code></pre>`; | ||
|
||
ts0: string = ` | ||
<pre><code class="typescript">export class FilterInputChangedExample { | ||
characters: Array<IOption> = this.optionService.getCharacters(); | ||
searchTerm: string = ''; | ||
constructor( | ||
private optionService: OptionService | ||
) {} | ||
onFilterInputChanged(searchTerm: string) { | ||
this.searchTerm = searchTerm; | ||
} | ||
} | ||
</pre></code>`; | ||
|
||
html1: string = ` | ||
<pre><code class="html"><div>Search term: {{searchTerm}}</div> | ||
<ng-select | ||
[options]="characters" | ||
[multiple]="true" | ||
(filterInputChanged)="onFilterInputChanged($event)"> | ||
</ng-select> | ||
</code></pre>`; | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.