You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/05/28 13:58:39 UTC
[GitHub] [superset] michael-s-molina commented on a change in pull request #14872: feat(Explore): add sort to edit dataset modal
michael-s-molina commented on a change in pull request #14872:
URL: https://github.com/apache/superset/pull/14872#discussion_r641566981
##########
File path: superset-frontend/src/CRUD/CollectionTable.tsx
##########
@@ -67,15 +74,23 @@ const CrudTableWrapper = styled.div<{ stickyHeader?: boolean }>`
stickyHeader &&
`
height: 350px;
- overflow: auto;
+ overflow-y: auto;
Review comment:
`overflow: auto` is a shorthand for `overflow-x` and `overflow-y`.
##########
File path: superset-frontend/src/CRUD/CollectionTable.tsx
##########
@@ -67,15 +74,23 @@ const CrudTableWrapper = styled.div<{ stickyHeader?: boolean }>`
stickyHeader &&
`
height: 350px;
- overflow: auto;
+ overflow-y: auto;
+ overflow-x: auto;
+ .table {
+ min-width: 800px;
+ }
thead th {
background: #fff;
position: sticky;
top: 0;
z-index: 9;
+ min
}
`}
+ th span {
+ vertical-align: -8px;
Review comment:
`gridUnit * -2`?
##########
File path: superset-frontend/src/CRUD/CollectionTable.tsx
##########
@@ -181,15 +205,75 @@ export default class CRUDCollection extends React.PureComponent<
}));
}
+ sortColumn(col: string, sort = 0) {
+ const { sortColumns } = this.props;
+ // default sort logic sorting string, boolean and number
+ const compareSort = (m: any, n: any) => {
Review comment:
If the comparator can only handle `string`, `boolean` and `number`, maybe we can add these types instead of `any`.
##########
File path: superset-frontend/src/CRUD/CollectionTable.tsx
##########
@@ -181,15 +205,75 @@ export default class CRUDCollection extends React.PureComponent<
}));
}
+ sortColumn(col: string, sort = 0) {
Review comment:
Shouldn't `sort` be a `boolean` indicating if it's ascending or descending? Do we have more than two possible states?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org