mirror of
https://github.com/mempool/mempool.git
synced 2024-12-28 09:14:26 +01:00
Address search with middle ellipsis mobile fix
This commit is contained in:
parent
e5b2440b45
commit
daa7079338
@ -1,10 +1,18 @@
|
|||||||
:host ::ng-deep {
|
:host ::ng-deep {
|
||||||
.dropdown-item {
|
.dropdown-item {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 410px;
|
width: calc(100% - 34px);
|
||||||
}
|
}
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
width: 410px;
|
width: calc(100% - 34px);
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.dropdown-item {
|
||||||
|
width: 410px;
|
||||||
|
}
|
||||||
|
.dropdown-menu {
|
||||||
|
width: 410px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ export class SearchFormComponent implements OnInit {
|
|||||||
typeaheadSearchFn: ((text: Observable<string>) => Observable<readonly any[]>);
|
typeaheadSearchFn: ((text: Observable<string>) => Observable<readonly any[]>);
|
||||||
|
|
||||||
searchForm: FormGroup;
|
searchForm: FormGroup;
|
||||||
|
isMobile = (window.innerWidth <= 767.98);
|
||||||
@Output() searchTriggered = new EventEmitter();
|
@Output() searchTriggered = new EventEmitter();
|
||||||
|
|
||||||
regexAddress = /^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,100}|[A-Z]{2,5}1[AC-HJ-NP-Z02-9]{8,100})$/;
|
regexAddress = /^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,100}|[A-Z]{2,5}1[AC-HJ-NP-Z02-9]{8,100})$/;
|
||||||
@ -34,7 +35,7 @@ export class SearchFormComponent implements OnInit {
|
|||||||
focus$ = new Subject<string>();
|
focus$ = new Subject<string>();
|
||||||
click$ = new Subject<string>();
|
click$ = new Subject<string>();
|
||||||
|
|
||||||
formatterFn = (address: string) => this.shortenStringPipe.transform(address, 40);
|
formatterFn = (address: string) => this.shortenStringPipe.transform(address, this.isMobile ? 33 : 40);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
|
Loading…
Reference in New Issue
Block a user