Input: Fix tooltip in chips and autocomplete. Fix a bug in notify-form with 0 padding

This commit is contained in:
Konstantinos Triantafyllou 2022-06-06 17:16:51 +03:00
parent eac367a872
commit f3af762dab
2 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@
}
[notify-form] .input-wrapper.recipients {
--input-padding-horizontal: 0;
--input-padding-horizontal: 0px;
--input-font-size: 14px;
--input-placeholder-weight: 700;
--input-placeholder-color: var(--grey-color);

View File

@ -93,7 +93,7 @@ declare var UIkit;
<div *ngFor="let chip of formAsArray.controls; let i=index" [class.uk-hidden]="!focused && i > 0"
class="chip">
<div class="uk-label uk-label-small uk-flex uk-flex-middle"
[attr.uk-tooltip]="(tooltip)?('title: ' + getLabel(chip.value) + '; delay: 500'):null">
[attr.uk-tooltip]="(tooltip)?('title: ' + getLabel(chip.value) + '; delay: 500; pos: bottom-left'):null">
<span class="uk-text-truncate uk-width-expand">{{getLabel(chip.value)}}</span>
<icon (click)="remove(i, $event)" class="uk-link-text uk-margin-small-left clickable" [flex]="true"
name="close" ratio="0.7"></icon>
@ -258,6 +258,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
return option;
}
});
if(!this.tooltip) {
this.tooltip = this.optionsArray.length > 0;
}
if(this.type === "select") {
if (this.optionsArray.length > 7) {
this.type = 'autocomplete';
@ -265,7 +268,6 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
this.icon = this.selectArrow;
}
this.selectable = true;
this.tooltip = true;
}
}