rusackas commented on a change in pull request #14844:
URL: https://github.com/apache/superset/pull/14844#discussion_r640378466
##########
File path: superset-frontend/src/datasource/ChangeDatasourceModal.tsx
##########
@@ -208,6 +211,28 @@ const ChangeDatasourceModal:
FunctionComponent<ChangeDatasourceModalProps> = ({
return data;
};
+ const customGotoPage = (p: number) => {
+ SupersetClient.get({
+ endpoint: `/api/v1/dataset/?q=${rison.encode({
+ order_column: 'changed_on_delta_humanized',
+ order_direction: 'desc',
+ page: p - 1,
+ page_size: 20,
+ })}`,
+ }).then(resources => {
+ setPageIndex(p - 1);
+ setResourceCollection(resources.json.result);
+ });
+ };
+
+ const styleOverride = css`
+ .table-condensed {
Review comment:
Also, adding the styles via a `const` like this is OK, but it's also OK
add them more directly as you've done elsewhere, with
```js
<Table View
css={theme => css`
/* styles here... */
`
...
}
```
##########
File path: superset-frontend/src/datasource/ChangeDatasourceModal.tsx
##########
@@ -208,6 +211,28 @@ const ChangeDatasourceModal:
FunctionComponent<ChangeDatasourceModalProps> = ({
return data;
};
+ const customGotoPage = (p: number) => {
+ SupersetClient.get({
+ endpoint: `/api/v1/dataset/?q=${rison.encode({
+ order_column: 'changed_on_delta_humanized',
+ order_direction: 'desc',
+ page: p - 1,
+ page_size: 20,
+ })}`,
+ }).then(resources => {
+ setPageIndex(p - 1);
+ setResourceCollection(resources.json.result);
+ });
+ };
+
+ const styleOverride = css`
+ .table-condensed {
+ height: 300px;
+ margin-bottom: 16px;
Review comment:
`gridUnit * 4`
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]