-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dynamic-forms): add support for Materials multiselect form field (…
- Loading branch information
1 parent
cf0439d
commit 95c773d
Showing
11 changed files
with
73 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<td-dynamic-forms [elements]="elements"></td-dynamic-forms> | ||
<button mat-raised-button (click)="submit()">Submit</button> |
Empty file.
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,46 @@ | ||
import { Component, ViewChild } from '@angular/core'; | ||
import { | ||
ITdDynamicElementConfig, | ||
TdDynamicElement, | ||
TdDynamicFormsComponent, | ||
} from '@covalent/dynamic-forms'; | ||
|
||
@Component({ | ||
selector: 'multi-select-demo', | ||
styleUrls: ['./multiselect.component.scss'], | ||
templateUrl: './multiselect.component.html', | ||
}) | ||
export class MultiSelectDemoComponent { | ||
elements: ITdDynamicElementConfig[] = [ | ||
{ | ||
type: TdDynamicElement.Select, | ||
name: 'multifield', | ||
label: 'No Multiselect', | ||
selections: ['A', 'B', 'C', 'D'], | ||
flex: 50, | ||
}, | ||
{ | ||
type: TdDynamicElement.Select, | ||
name: 'multifield2', | ||
label: 'Multiselect', | ||
multiple: true, | ||
selections: ['A', 'B', 'C'], | ||
flex: 50, | ||
}, | ||
{ | ||
type: TdDynamicElement.Select, | ||
name: 'multifield3', | ||
label: 'Multiselect Alt', | ||
multiple: true, | ||
selections: ['A', 'B', 'C'], | ||
default: ['A', 'C'], | ||
flex: 50, | ||
}, | ||
]; | ||
|
||
@ViewChild(TdDynamicFormsComponent) public form: TdDynamicFormsComponent; | ||
|
||
public submit(): void { | ||
this.form.refresh(); | ||
} | ||
} |
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