Skip to content

Commit

Permalink
Merge pull request #179 from KxSystems/KXI-31286
Browse files Browse the repository at this point in the history
KXI-31286 - It's easy to accidentally drop columns from the KDB Results view
  • Loading branch information
Philip-Carneiro-KX authored Nov 6, 2023
2 parents 6a42b7a + 256c78d commit d8aecd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/services/resultsPanelProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider {
enableCellTextSelection: true,
ensureDomOrder: true,
suppressContextMenu: true,
suppressDragLeaveHidesColumns: true,
});
}

Expand Down
2 changes: 1 addition & 1 deletion test/suite/panels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe("WebPanels", () => {
it("should return 'gridOptions' if queryResult is an empty string", () => {
const inputQueryResult = [{ a: "1" }, { a: "2" }, { a: "3" }];
const expectedOutput =
'{"defaultColDef":{"sortable":true,"resizable":true,"filter":true,"flex":1,"minWidth":100},"rowData":[{"a":"1"},{"a":"2"},{"a":"3"}],"columnDefs":[{"field":"a","headerName":"a"}],"domLayout":"autoHeight","pagination":true,"paginationPageSize":100,"cacheBlockSize":100,"enableCellTextSelection":true,"ensureDomOrder":true,"suppressContextMenu":true}';
'{"defaultColDef":{"sortable":true,"resizable":true,"filter":true,"flex":1,"minWidth":100},"rowData":[{"a":"1"},{"a":"2"},{"a":"3"}],"columnDefs":[{"field":"a","headerName":"a"}],"domLayout":"autoHeight","pagination":true,"paginationPageSize":100,"cacheBlockSize":100,"enableCellTextSelection":true,"ensureDomOrder":true,"suppressContextMenu":true,"suppressDragLeaveHidesColumns":true}';
const actualOutput = resultsPanel.convertToGrid(inputQueryResult);
assert.strictEqual(actualOutput, expectedOutput);
});
Expand Down

0 comments on commit d8aecd9

Please sign in to comment.