mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
Fix for auto resize column headers, (#10909)
* Fixed scroll to top * removed brackets * Don't trigger the cellSelectionModel when className is the resizable handler * Added message for header listener Co-authored-by: Amir Omidi <amomidi@microsoft.com>
This commit is contained in:
@@ -15,6 +15,10 @@ const defaults: ICellSelectionModelOptions = {
|
||||
selectActiveCell: true
|
||||
};
|
||||
|
||||
interface EventTargetWithClassName extends EventTarget {
|
||||
className: string | undefined;
|
||||
}
|
||||
|
||||
export class CellSelectionModel<T> implements Slick.SelectionModel<T, Array<Slick.Range>> {
|
||||
private grid!: Slick.Grid<T>;
|
||||
private selector: ICellRangeSelector<T>;
|
||||
@@ -110,6 +114,9 @@ export class CellSelectionModel<T> implements Slick.SelectionModel<T, Array<Slic
|
||||
}
|
||||
|
||||
private handleHeaderClick(e: MouseEvent, args: Slick.OnHeaderClickEventArgs<T>) {
|
||||
if ((e.target as EventTargetWithClassName).className === 'slick-resizable-handle') {
|
||||
return;
|
||||
}
|
||||
if (!isUndefinedOrNull(args.column)) {
|
||||
let columnIndex = this.grid.getColumnIndex(args.column.id!);
|
||||
if (this.grid.canCellBeSelected(0, columnIndex)) {
|
||||
|
||||
Reference in New Issue
Block a user