File tree Expand file tree Collapse file tree 3 files changed +30
-11
lines changed Expand file tree Collapse file tree 3 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 1
1
< div [ngSwitch] ="field.inputView||field.type " *ngIf ="group " [formGroup] ="group ">
2
2
< ec-input-errors [control] ="group.get(field.property) "> </ ec-input-errors >
3
3
< div *ngSwitchCase ="'entry-select' ">
4
+ < div *ngIf ="!field['relation'] ">
5
+ < marquee > 🚂🚃🚃🚃 Caution: Using single entry fields without validation is experimental</ marquee >
6
+ </ div >
4
7
< ec-entry-select [focusEvent] ="focusEvent " [placeholder] ="field.placeholder " [formControl] ="group.get(field.property) "
5
8
[model] ="field['relation'] " [id] ="field.id " [solo] ="true " [config] ="field.nestedCrudConfig "> </ ec-entry-select >
6
9
</ div >
7
10
< div *ngSwitchCase ="'entries-select' ">
8
- < ec-entry-select [focusEvent] ="focusEvent " [placeholder] ="field.placeholder " [formControl] ="group.get(field.property) "
11
+ < div *ngIf ="!field['relation'] ">
12
+ < marquee > 🚂🚃🚃🚃 No model set in field validation. Use inputView "entries-actionbar" or set validation...</ marquee >
13
+ </ div >
14
+ < ec-entry-select *ngIf ="field['relation'] " [focusEvent] ="focusEvent " [placeholder] ="field.placeholder " [formControl] ="group.get(field.property) "
9
15
[model] ="field['relation'] " [id] ="field.id " [config] ="field.nestedCrudConfig "> </ ec-entry-select >
10
16
</ div >
11
17
< div *ngSwitchCase ="'entries-actionbar' ">
15
21
< div *ngSwitchCase ="'entry-list-select' ">
16
22
<!-- [placeholder]="field.placeholder" -->
17
23
<!-- [config]="field.nestedCrudConfig" -->
18
- < ec-entry-list-select [formControl] ="group.get(field.property) " [model] ="field['relation'] " [id] ="field.id "
24
+ < div *ngIf ="!field['relation'] ">
25
+ < marquee > 🚂🚃🚃🚃 No model set in field validation. Use inputView "entries-actionbar" or set validation...</ marquee >
26
+ </ div >
27
+ < ec-entry-list-select *ngIf ="field['relation'] " [formControl] ="group.get(field.property) " [model] ="field['relation'] " [id] ="field.id "
19
28
[listConfig] ="field.nestedCrudConfig ">
20
29
</ ec-entry-list-select >
21
30
</ div >
Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ export class EntryListPopComponent extends PopComponent implements OnChanges {
57
57
}
58
58
getHeader ( entryList ) {
59
59
const label = this . config . singularLabel || `${ entryList . model } ` ;
60
- if ( ! this . selection . isEmpty ( ) ) {
61
- return `${ label } : ${ this . selection . items . length } selected ` ;
60
+ if ( ! this . selection || this . selection . isEmpty ( ) ) {
61
+ return `${ label } ` ;
62
62
}
63
- return `${ label } ` ;
63
+ return `${ label } : ${ this . selection . items . length } selected ` ;
64
64
}
65
65
}
Original file line number Diff line number Diff line change 1
1
< ec-entry-list-pop #entryListPop [model] ="model " [selection] ="selection "> </ ec-entry-list-pop >
2
- < ec-list [config] ="selectionConfig " [items] ="items " (columnClicked) ="entryPop.edit($event.getBody()) " #selectionList > </ ec-list >
3
- < ec-entry-pop [model] ="model " #entryPop (submitted) ="formSubmitted($event) " (deleted) ="removeItem($event) "> </ ec-entry-pop >
2
+ < ec-list
3
+ [config] ="selectionConfig "
4
+ [items] ="items "
5
+ (columnClicked) ="entryPop.edit($event.getBody()) "
6
+ #selectionList
7
+ > </ ec-list >
8
+ < ec-entry-pop
9
+ [model] ="model "
10
+ #entryPop
11
+ (submitted) ="formSubmitted($event) "
12
+ (deleted) ="removeItem($event) "
13
+ > </ ec-entry-pop >
4
14
5
- < a class ="btn btn_clear btn_square " (click) ="entryPop.create() " *ngIf ="!disabled&& model ">
6
- < ec-icon name ="add "> </ ec-icon >
15
+ < a class ="btn btn_clear btn_square " (click) ="entryPop.create() " *ngIf ="!disabled && model ">
16
+ < ec-icon name ="add "> </ ec-icon >
7
17
</ a >
8
18
< a class ="btn btn_clear btn_square " (click) ="entryListPop.show() " *ngIf ="!disabled ">
9
- < ec-icon name ="search "> </ ec-icon >
10
- </ a >
19
+ < ec-icon name ="search "> </ ec-icon >
20
+ </ a >
You can’t perform that action at this time.
0 commit comments