Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Select): fix for missing filter input #1452

Merged
merged 1 commit into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/app/components/select/select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ <h4 tsSelectOptionDisplay>None</h4>
</ts-select-option>

<ts-select-option
[value]="option.bar"
[value]="option.slug"
[option]="option"
[isDisabled]="option?.disabled"
*ngFor="let option of firstOptions | async"
Expand Down
15 changes: 8 additions & 7 deletions terminus-ui/select/src/select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,6 @@
(attach)="onAttached()"
(detach)="close()"
>
<div class="ts-select-panel__filter-input" *ngIf="isFilterable">
<ts-input
label="Begin typing to filter..."
[ngModel]="searchQuery"
(ngModelChange)="queryChange.emit($event)"
></ts-input>
</div>

<div
#panel
Expand All @@ -146,6 +139,14 @@
[style.font-size.px]="triggerFontSize"
(keydown)="handleKeydown($event)"
>
<div class="ts-select-panel__filter-input" *ngIf="isFilterable">
<ts-input
label="Begin typing to filter..."
[ngModel]="searchQuery"
(ngModelChange)="queryChange.emit($event)"
></ts-input>
</div>

<div
class="ts-select-panel__toggle-all qa-select-toggle-all"
(click)="toggleAllOptions()"
Expand Down
6 changes: 4 additions & 2 deletions terminus-ui/select/src/select.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@ $ts-select-placeholder-arrow-space: 2 * ($ts-select-arrow-size + $ts-select-arro
// Position the filter input inside the panel
.cdk-overlay-pane {
.ts-select-panel__filter-input {
$padding: spacing(small, 1);
background-color: color(pure);
border-bottom: 1px solid color(utility, light);
left: 0;
padding: spacing(small, 1);
padding: $padding;
position: absolute;
right: -#{spacing(large, 1)};
right: -#{$padding * 3};
top: 0;
width: calc(100% - #{$padding * 2});
z-index: z(panel-header);

.ts-form-field .ts-form-field__wrapper {
Expand Down