mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-8899] Undercounted space from the top for view more button (#10403)
* [ACS-8065] tag creator unification * [ACS-8065] test adjustments and after review fixes * [ACS-8065] remove unnecessary style * [ACS-8065] fix style selector * [ACS-8065] remove transforming pipe and unnecessary styles * [ACS-8065] fixes * [ACS-8065] fixes * [ACS-8065] fixes * [ACS-8065] fix view more button placement * [ACS-8065] fix view more button placement * [ACS-8899] Undercounted space from the top for view more button * [ACS-8899] Post rebase fixes --------- Co-authored-by: tamaragruszka <tamara.gruszka@hyland.com> Co-authored-by: MichalKinas <michal.kinas@hyland.com>
This commit is contained in:
@@ -181,7 +181,7 @@ export class DynamicChipListComponent implements OnChanges, OnInit, AfterViewIni
|
||||
width += val._elementRef.nativeElement.getBoundingClientRect().width + chipMargin;
|
||||
const availableSpace =
|
||||
(index && index === chips.length - 1) || !this.paginationData ? containerWidth - viewMoreBtnWidth : containerWidth;
|
||||
if (availableSpace >= width) {
|
||||
if (availableSpace >= width - chipMargin) {
|
||||
chipsToDisplay = (this.paginationData ? chipsToDisplay : index) + 1;
|
||||
lastIndex++;
|
||||
this.viewMoreButtonLeftOffset = width;
|
||||
@@ -225,11 +225,13 @@ export class DynamicChipListComponent implements OnChanges, OnInit, AfterViewIni
|
||||
if (this.paginationData?.hasMoreItems) {
|
||||
const lastChipTop = this.matChips.last._elementRef.nativeElement.offsetTop;
|
||||
if (this.moveLoadMoreButtonToNextRow) {
|
||||
const buttonTopHeightCorrection = 5;
|
||||
this.viewMoreButtonLeftOffset = 0;
|
||||
this.viewMoreButtonTop = lastChipTop + viewMoreButton.offsetHeight;
|
||||
this.viewMoreButtonTop = lastChipTop + viewMoreButton.offsetHeight + buttonTopHeightCorrection;
|
||||
} else {
|
||||
const buttonTopHeightCorrection = 3;
|
||||
this.viewMoreButtonLeftOffset = this.viewMoreButtonLeftOffsetBeforeFlexDirection;
|
||||
this.viewMoreButtonTop = lastChipTop;
|
||||
this.viewMoreButtonTop = lastChipTop - buttonTopHeightCorrection;
|
||||
}
|
||||
} else {
|
||||
this.viewMoreButtonLeftOffset = this.columnFlexDirection ? 0 : this.viewMoreButtonLeftOffsetBeforeFlexDirection;
|
||||
|
Reference in New Issue
Block a user