-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3223 from IgniteUI/ikitanov/list-2988-vNext
Ikitanov/list 2988 v next
- Loading branch information
Showing
12 changed files
with
152 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
|
||
igx-icon { | ||
cursor: pointer; | ||
position: relative; | ||
} | ||
|
||
.search { | ||
|
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
|
||
igx-icon { | ||
cursor: pointer; | ||
position: relative; | ||
} | ||
|
||
.search { | ||
|
121 changes: 63 additions & 58 deletions
121
src/app/lists/list/list-sample-4/list-sample-4.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 |
---|---|---|
@@ -1,71 +1,76 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { DisplayDensity, IgxFilterOptions } from 'igniteui-angular'; | ||
@Component({ | ||
selector: 'app-contact-list2', | ||
styleUrls: ['./list-sample-4.component.scss'], | ||
templateUrl: './list-sample-4.component.html' | ||
selector: 'app-contact-list2', | ||
styleUrls: ['./list-sample-4.component.scss'], | ||
templateUrl: './list-sample-4.component.html' | ||
}) | ||
export class ListSample4Component implements OnInit { | ||
public searchContact: string; | ||
public searchContact: string; | ||
|
||
public contacts = [ | ||
{ | ||
isFavorite: false, | ||
name: 'Terrance Orta', | ||
phone: '770-504-2217', | ||
photo: 'assets/images/men/27.jpg' | ||
}, | ||
{ | ||
isFavorite: true, | ||
name: 'Richard Mahoney', | ||
phone: '423-676-2869', | ||
photo: 'assets/images/men/1.jpg' | ||
}, | ||
{ | ||
isFavorite: false, | ||
name: 'Donna Price', | ||
phone: '859-496-2817', | ||
photo: 'assets/images/women/50.jpg' | ||
}, | ||
{ | ||
isFavorite: false, | ||
name: 'Lisa Landers', | ||
phone: '901-747-3428', | ||
photo: 'assets/images/women/3.jpg' | ||
}, | ||
{ | ||
isFavorite: true, | ||
name: 'Dorothy H. Spencer', | ||
phone: '573-394-9254', | ||
photo: 'assets/images/women/67.jpg' | ||
} | ||
]; | ||
public contacts = [ | ||
{ | ||
isFavorite: false, | ||
name: 'Terrance Orta', | ||
phone: '770-504-2217', | ||
photo: 'assets/images/men/27.jpg' | ||
}, | ||
{ | ||
isFavorite: true, | ||
name: 'Richard Mahoney', | ||
phone: '423-676-2869', | ||
photo: 'assets/images/men/1.jpg' | ||
}, | ||
{ | ||
isFavorite: false, | ||
name: 'Donna Price', | ||
phone: '859-496-2817', | ||
photo: 'assets/images/women/50.jpg' | ||
}, | ||
{ | ||
isFavorite: false, | ||
name: 'Lisa Landers', | ||
phone: '901-747-3428', | ||
photo: 'assets/images/women/3.jpg' | ||
}, | ||
{ | ||
isFavorite: true, | ||
name: 'Dorothy H. Spencer', | ||
phone: '573-394-9254', | ||
photo: 'assets/images/women/67.jpg' | ||
} | ||
]; | ||
|
||
public density: DisplayDensity = 'comfortable'; | ||
public displayDensities; | ||
public density: DisplayDensity = 'comfortable'; | ||
public displayDensities; | ||
|
||
constructor() { } | ||
constructor() { } | ||
|
||
public ngOnInit() { | ||
this.displayDensities = [ | ||
{ label: 'comfortable', selected: this.density === 'comfortable', togglable: true }, | ||
{ label: 'cosy', selected: this.density === 'cosy', togglable: true }, | ||
{ label: 'compact', selected: this.density === 'compact', togglable: true } | ||
]; | ||
} | ||
public ngOnInit() { | ||
this.displayDensities = [ | ||
{ label: 'comfortable', selected: this.density === 'comfortable', togglable: true }, | ||
{ label: 'cosy', selected: this.density === 'cosy', togglable: true }, | ||
{ label: 'compact', selected: this.density === 'compact', togglable: true } | ||
]; | ||
} | ||
|
||
public selectDensity(event) { | ||
this.density = this.displayDensities[event.index].label; | ||
} | ||
public selectDensity(event) { | ||
this.density = this.displayDensities[event.index].label; | ||
} | ||
|
||
public toggleFavorite(contact: any) { | ||
contact.isFavorite = !contact.isFavorite; | ||
} | ||
public toggleFavorite(contact: any, event: Event) { | ||
event.stopPropagation(); | ||
contact.isFavorite = !contact.isFavorite; | ||
} | ||
|
||
get filterContacts() { | ||
const fo = new IgxFilterOptions(); | ||
fo.key = 'name'; | ||
fo.inputValue = this.searchContact; | ||
return fo; | ||
} | ||
|
||
get filterContacts() { | ||
const fo = new IgxFilterOptions(); | ||
fo.key = 'name'; | ||
fo.inputValue = this.searchContact; | ||
return fo; | ||
} | ||
public mousedown(event: Event) { | ||
event.stopPropagation(); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
|
||
igx-icon { | ||
cursor: pointer; | ||
position: relative; | ||
} | ||
|
||
.listItemLeftPanningStyle { | ||
|
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 |
---|---|---|
|
@@ -19,4 +19,5 @@ | |
|
||
igx-icon { | ||
cursor: pointer; | ||
position: relative; | ||
} |
Oops, something went wrong.