You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by pk...@apache.org on 2021/06/23 16:40:55 UTC
[superset] branch master updated: refactor: migrate icon to icons
in tablecollection (#15309)
This is an automated email from the ASF dual-hosted git repository.
pkdotson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new f35ce39 refactor: migrate icon to icons in tablecollection (#15309)
f35ce39 is described below
commit f35ce394bfb78969c8f6396980f241b0dcc22da3
Author: Phillip Kelley-Dotson <pk...@yahoo.com>
AuthorDate: Wed Jun 23 09:40:06 2021 -0700
refactor: migrate icon to icons in tablecollection (#15309)
* initial commit
* fix flaky test
* remove line
---
.../src/components/AlteredSliceTag/AlteredSliceTag.test.jsx | 4 ++--
.../src/components/dataViewCommon/TableCollection.tsx | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx b/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx
index 1794144..6f3d5e3 100644
--- a/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx
+++ b/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx
@@ -128,8 +128,8 @@ describe('AlteredSliceTag', () => {
);
const th = getTableWrapperFromModalBody(modalBody).find('th');
expect(th).toHaveLength(3);
- ['Control', 'Before', 'After'].forEach((v, i) => {
- expect(th.find('span').get(i).props.children[0]).toBe(v);
+ ['Control', 'Before', 'After'].forEach(async (v, i) => {
+ await expect(th.find('span').get(i).props.children[0]).toBe(v);
});
});
diff --git a/superset-frontend/src/components/dataViewCommon/TableCollection.tsx b/superset-frontend/src/components/dataViewCommon/TableCollection.tsx
index e6f4660..b200eb1 100644
--- a/superset-frontend/src/components/dataViewCommon/TableCollection.tsx
+++ b/superset-frontend/src/components/dataViewCommon/TableCollection.tsx
@@ -20,7 +20,7 @@ import React from 'react';
import cx from 'classnames';
import { TableInstance } from 'react-table';
import { styled } from '@superset-ui/core';
-import Icon from 'src/components/Icon';
+import Icons from 'src/components/Icons';
interface TableCollectionProps {
getTableProps: (userProps?: any) => any;
@@ -228,11 +228,11 @@ export default React.memo(
{headerGroups.map(headerGroup => (
<tr {...headerGroup.getHeaderGroupProps()}>
{headerGroup.headers.map(column => {
- let sortIcon = <Icon name="sort" />;
+ let sortIcon = <Icons.Sort />;
if (column.isSorted && column.isSortedDesc) {
- sortIcon = <Icon name="sort-desc" />;
+ sortIcon = <Icons.SortDesc />;
} else if (column.isSorted && !column.isSortedDesc) {
- sortIcon = <Icon name="sort-asc" />;
+ sortIcon = <Icons.SortAsc />;
}
return column.hidden ? null : (
<th