-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding ability to fix table columns in place (#7019)
This change involved adding an extra option to the GridSettings editor, adding the "fixed" option to columns, and adding styling for the fixed columns. In order to change the number of fixed columns, which will default to 0, one has to go to Edit visualization -> Grid -> Choose number of columns to fix -> Save.
- Loading branch information
Showing
9 changed files
with
146 additions
and
22 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
client/cypress/integration/visualizations/table/.mocks/wide-dataset.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const loremIpsum = | ||
"Lorem ipsum dolor sit amet consectetur adipiscing elit" + | ||
"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"; | ||
|
||
export const query = ` | ||
SELECT '${loremIpsum}' AS a, '${loremIpsum}' AS b, '${loremIpsum}' AS c, '${loremIpsum}' AS d, '${loremIpsum}' as e | ||
`; | ||
|
||
export const config = { | ||
itemsPerPage: 10, | ||
columns: [ | ||
{ | ||
name: "a", | ||
displayAs: "string", | ||
}, | ||
{ | ||
name: "b", | ||
displayAs: "string", | ||
}, | ||
{ | ||
name: "c", | ||
displayAs: "string", | ||
}, | ||
{ | ||
name: "d", | ||
displayAs: "string", | ||
}, | ||
{ | ||
name: "e", | ||
displayAs: "string", | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
export function expectTableToHaveLength(length) { | ||
cy.getByTestId("TableVisualization") | ||
.find("tbody tr") | ||
.find("tbody tr.ant-table-row") | ||
.should("have.length", length); | ||
} | ||
|
||
export function expectFirstColumnToHaveMembers(values) { | ||
cy.getByTestId("TableVisualization") | ||
.find("tbody tr td:first-child") | ||
.find("tbody tr.ant-table-row td:first-child") | ||
.then($cell => Cypress.$.map($cell, item => Cypress.$(item).text())) | ||
.then(firstColumnCells => expect(firstColumnCells).to.have.members(values)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters