Skip to content

Commit

Permalink
fix: fix two scrollbar error
Browse files Browse the repository at this point in the history
  • Loading branch information
HandsomeButterball committed Jul 4, 2023
1 parent 2413774 commit b73c3e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion example/src/app/gantt-virtual-scroll/gantt.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<thy-layout>
<thy-content>
<ngx-gantt #gantt [items]="items" virtualScrollEnabled="true">
<ngx-gantt #gantt [items]="items" [virtualScrollEnabled]="true">
<ngx-gantt-table>
<ngx-gantt-column name="标题" width="180px">
<ng-template #cell let-item="item"> {{ item.title }} </ng-template>
Expand Down
2 changes: 1 addition & 1 deletion example/src/app/gantt/gantt.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
[showToolbar]="isShowToolbarChecked"
[toolbarOptions]="toolbarOptions"
[loading]="loading"
virtualScrollEnabled="false"
[virtualScrollEnabled]="false"
(barClick)="barClick($event)"
(viewChange)="viewChange($event)"
(lineClick)="lineClick($event)"
Expand Down
8 changes: 6 additions & 2 deletions packages/gantt/src/gantt.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
right: 0;
// 兼容火狐浏览器
overflow: auto;
overflow: overlay;
background-color: variables.$gantt-container-background-color;

.gantt-main-groups,
Expand Down Expand Up @@ -100,7 +99,6 @@
z-index: 2;
// 兼容火狐浏览器
overflow: auto;
overflow: overlay;
.cdk-virtual-scroll-content-wrapper {
width: 100%;
min-width: unset;
Expand All @@ -110,6 +108,7 @@
.gantt-main-container {
height: 100%;
top: 0;
overflow-y: hidden;
}
}
}
Expand All @@ -121,6 +120,11 @@
.cdk-virtual-scroll-spacer {
display: none;
}
.gantt-container {
.gantt-main-container {
overflow-y: auto;
}
}
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/gantt/src/gantt.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { GanttDate } from './utils/date';
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
import { Dictionary, keyBy, recursiveItems, uniqBy } from './utils/helpers';
import { GanttPrintService } from './gantt-print.service';
import { InputBoolean } from 'ngx-tethys/core';
@Component({
selector: 'ngx-gantt',
templateUrl: './gantt.component.html',
Expand Down Expand Up @@ -74,7 +73,7 @@ export class NgxGanttComponent extends GanttUpper implements OnInit, OnChanges,
}
}

@Input() @InputBoolean() virtualScrollEnabled = true;
@Input() virtualScrollEnabled = true;

@Input() loadingDelay: number = 0;

Expand Down

0 comments on commit b73c3e3

Please sign in to comment.