-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1644 Add button for VirtualizedTable Rows in Expression Builder #1645
#1644 Add button for VirtualizedTable Rows in Expression Builder #1645
Conversation
...dules/common-canvas/src/common-properties/components/virtualized-table/virtualized-table.jsx
Outdated
Show resolved
Hide resolved
canvas_modules/harness/src/client/constants/json/functionlist.json
Outdated
Show resolved
Hide resolved
...ommon-properties/controls/expression/expression-builder/expression-select-field-function.jsx
Outdated
Show resolved
Hide resolved
...ommon-properties/controls/expression/expression-builder/expression-select-field-function.jsx
Outdated
Show resolved
Hide resolved
canvas_modules/common-canvas/__tests__/test_resources/json/expression-function-list.json
Outdated
Show resolved
Hide resolved
canvas_modules/common-canvas/__tests__/common-properties/controls/expression-test.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do something to make it so the add button row stays the same width? In some case it's using too much space and caused an ellipsis.
Also, I found a defect when sorting a column then clicking on it. The wrong row is selected. This isn't caused by your change but can you have a look to see if it's an easy fix or create a new issue for it.
000a423
to
bf56d13
Compare
|
{ | ||
key: "addColumn", | ||
label: formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN), | ||
width: "50px", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all the addColumn fields we should also add addColumn
staticWidth: true
{ | ||
key: "values", | ||
label: categoryInfo.field_columns.value_column_info.locLabel, | ||
description: categoryInfo.field_columns.value_column_info.descLabel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comma at the end
|
||
headers.push({ key: "function", label: functionColumn, width: 73, resizable: true }); | ||
headers.push({ key: "return", label: returnColumn, width: 27 }); | ||
headers.push({ key: "addColumn", label: addNewColumn, width: "50px", resizable: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't have resizable
Signed-off-by: Veena S <[email protected]>
Signed-off-by: Veena S <[email protected]>
Signed-off-by: Veena S <[email protected]>
Signed-off-by: Veena S <[email protected]>
Signed-off-by: Veena S <[email protected]>
Signed-off-by: Veena S <[email protected]>
Signed-off-by: Veena S <[email protected]>
6cbcc4d
to
c7a0d97
Compare
Signed-off-by: Veena S <[email protected]>
...dules/common-canvas/src/common-properties/components/virtualized-table/virtualized-table.jsx
Show resolved
Hide resolved
@@ -380,7 +380,7 @@ class VirtualizedTable extends React.Component { | |||
} | |||
|
|||
if (this.props.selectable) { | |||
const rowSelected = this.isRowSelected(rowData.originalRowIndex); | |||
const rowSelected = this.props.sortDirection ? this.isRowSelected(rowData.index) : this.isRowSelected(rowData.originalRowIndex); // use current row index when Sorted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@caritaou Do you see any issue with this change? I did some testing around row selection and for the most part it doesn't really work correctly onSort in the table controls. It just clears the selection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this does fix the issue in the expressionBuilder around sorting and selection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, considering this never worked for sorting columns with row selections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. @caritaou can you merge if you think the selection change is good.
Fixes: #1644
Developer's Certificate of Origin 1.1