mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 19:18:32 -05:00
Fix scrolling in Jobs view page (#1346)
* resize when window resized * fix scrolling issues
This commit is contained in:
committed by
Karl Burtram
parent
1847c2e322
commit
03989a5af0
@@ -32,7 +32,7 @@ jobhistory-component {
|
||||
}
|
||||
|
||||
#jobsDiv .jobview-grid {
|
||||
height: 96%;
|
||||
height: 94.7%;
|
||||
width : 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ export class JobsViewComponent implements AfterContentChecked {
|
||||
private _serverName: string;
|
||||
private _isCloud: boolean;
|
||||
private _showProgressWheel: boolean;
|
||||
private _tabHeight: number;
|
||||
|
||||
constructor(
|
||||
@Inject(BOOTSTRAP_SERVICE_ID) private bootstrapService: IBootstrapService,
|
||||
@@ -202,9 +203,8 @@ export class JobsViewComponent implements AfterContentChecked {
|
||||
this.dataView.beginUpdate();
|
||||
this.dataView.setItems(jobViews);
|
||||
this.dataView.endUpdate();
|
||||
|
||||
this._table.resizeCanvas();
|
||||
this._table.autosizeColumns();
|
||||
this._table.resizeCanvas();
|
||||
let expandedJobs = this._agentViewComponent.expanded;
|
||||
let expansions = 0;
|
||||
for (let i = 0; i < jobs.length; i++){
|
||||
@@ -226,8 +226,18 @@ export class JobsViewComponent implements AfterContentChecked {
|
||||
});
|
||||
this._showProgressWheel = false;
|
||||
this._cd.detectChanges();
|
||||
$(window).resize(() => {
|
||||
this._table.resizeCanvas();
|
||||
const self = this;
|
||||
this._tabHeight = $('agentview-component #jobsDiv .jobview-grid').get(0).clientHeight;
|
||||
$(window).resize((e) => {
|
||||
let currentTabHeight = $('agentview-component #jobsDiv .jobview-grid').get(0).clientHeight;
|
||||
if (currentTabHeight < self._tabHeight) {
|
||||
$('agentview-component #jobsDiv div.ui-widget').css('height', `${currentTabHeight-22}px`);
|
||||
self._table.resizeCanvas();
|
||||
} else {
|
||||
$('agentview-component #jobsDiv div.ui-widget').css('height', `${currentTabHeight}px`);
|
||||
self._table.resizeCanvas();
|
||||
}
|
||||
self._tabHeight = currentTabHeight;
|
||||
});
|
||||
this.loadJobHistories();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user