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 2020/09/21 19:17:51 UTC

[GitHub] [incubator-superset] kgabryje commented on a change in pull request #10981: Replace reactable with DataTable from superset-ui in QueryTable

kgabryje commented on a change in pull request #10981:
URL: https://github.com/apache/incubator-superset/pull/10981#discussion_r492290307



##########
File path: superset-frontend/spec/javascripts/sqllab/QueryTable_spec.jsx
##########
@@ -18,27 +18,33 @@
  */
 import React from 'react';
 import { shallow } from 'enzyme';
-import { Table } from 'reactable-arc';
+import DataTable from '@superset-ui/plugin-chart-table/lib/DataTable';
+import * as useMountedMemo from '@superset-ui/plugin-chart-table/lib/DataTable/utils/useMountedMemo';
 import QueryTable from 'src/SqlLab/components/QueryTable';
 
-import { queries } from './fixtures';
+import { dataTableProps } from 'spec/javascripts/sqllab/fixtures';
 
 describe('QueryTable', () => {
+  // hack for mocking hook that implements sticky behaviour of DataTable
+  jest

Review comment:
       @rusackas This was needed because sticky DataTable uses `useLayoutEffect` under the hood and that caused enzyme not to render the component properly. If you have a better idea how to solve it I'll be happy to try it!




----------------------------------------------------------------
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