Merge pull request #4368 from mempool/simon/truncate-selection
Make search and select work for truncated text
This commit is contained in:
commit
eac8f8c2c6
@ -1,4 +1,5 @@
|
||||
<span class="truncate" [style.max-width]="maxWidth ? maxWidth + 'px' : null" [style.justify-content]="textAlign" [class.inline]="inline">
|
||||
<div class="hidden">{{ text }}</div>
|
||||
<ng-container *ngIf="link">
|
||||
<a [routerLink]="link" class="truncate-link">
|
||||
<ng-container *ngIf="rtl; then rtlTruncated; else ltrTruncated;"></ng-container>
|
||||
@ -11,6 +12,7 @@
|
||||
</span>
|
||||
|
||||
<ng-template #ltrTruncated>
|
||||
|
||||
<span class="first">{{text.slice(0,-lastChars)}}</span><span class="last-four">{{text.slice(-lastChars)}}</span>
|
||||
</ng-template>
|
||||
|
||||
|
@ -27,4 +27,17 @@
|
||||
&.inline {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hidden {
|
||||
color: transparent;
|
||||
position: absolute;
|
||||
max-width: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 567px) {
|
||||
.hidden {
|
||||
max-width: 150px;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user