Skip to content

Commit 4920dd4

Browse files
committed
fix: resource-select dropdown + config
1 parent 437ac98 commit 4920dd4

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

packages/data/src/lib/resource-select/resource-select.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@ export class ResourceSelectComponent extends SelectComponent<Resource> implement
4444
@Input() relation: string;
4545
/** The api to use */
4646
@Input() api: Core;
47-
/** The config that is being generated. */
48-
public config: CrudConfig<Resource>;
4947
/** Wether or not the selection should be solo */
5048
@Input() solo: boolean;
5149
/** The config that should be merged into the generated config */
5250
// tslint:disable-next-line:no-input-rename
53-
@Input('config') crudConfig: CrudConfig<Resource>;
51+
@Input() config: CrudConfig<Resource>;
5452
/** The crud pop with the list to select from */
5553
@ViewChild('dropdown') dropdown: PopComponent;
5654
/** The nested resource list in the dropdown */
@@ -143,7 +141,7 @@ export class ResourceSelectComponent extends SelectComponent<Resource> implement
143141
return;
144142
}
145143
this.config = <CrudConfig<Resource>>Object.assign(this.resourceConfig.get(this.relation)/* , { size: 5 } */,
146-
this.crudConfig, { solo: this.solo, selectMode: false, disableSelectSwitch: true } as CrudConfig<Resource>);
144+
this.config, { solo: this.solo, selectMode: false, disableSelectSwitch: true } as CrudConfig<Resource>);
147145
this.useConfig(this.config);
148146
}
149147

packages/style/scss/ec-select/ec-select.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
color: $ec-select-placeholder-hover-color;
5555
}
5656
}
57-
&:not(.has-dropdown) {
58-
.ec-select-options {
59-
display: none !important
60-
}
61-
}
6257
/* // @param {array} $ec-select-is-empty-style
6358
&:not(.has-searchbar) {
6459
&.is-empty {

packages/ui/src/lib/select/select.component.html.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export const selectTemplate = `<div class="ec-select" [class.ec-select_solo]="solo"
2-
[class.is-empty]="selection?.isEmpty()" (click)="activate($event)" [class.has-searchbar]="!config?.disableSearchbar"
3-
[class.has-dropdown]="!config?.disableDropdown">
2+
[class.is-empty]="selection?.isEmpty()" (click)="activate($event)" [class.has-searchbar]="!config?.disableSearchbar">
43
<ul class="ec-select-selection" dndDropzone (dndDrop)="onDrop($event)">
54
<li *ngIf="config?.disableSearchbar&&selection?.isEmpty()">
65
<span class="ec-select__placeholder">

0 commit comments

Comments
 (0)