chore: migrate QueryTable component from jsx to tsx (#17944)

* chore: fix misspelling of button

* changed QuerySearch/index.jsx to index.tsx

* updated Query type at src/SqlLab/types.ts/Query and extended it into QueryTable

* updated defaultQueryLimit to be optional at ResultSetProps of superset-frontend/src/SqlLab/components/ResultSet/index.tsx

* moved statusAttributes into useMemo hook so that it will not make the dependencies of useMemo Hook change on every render and statusAttributes is only used within useMomo hook

* reset package-lock.json and package.json at frontend

* Acquired redux rootestate type for SqlLab, to be used at useSelector(state)

* updated query to be Query type and added a comment for q.status on line 178

* updated queryTable for typescript conversion

* updated actions type on QueryHistory and QuerySearch

* updated type for actions in SouthPane

* created type for SqlLab redux

Co-authored-by: David Woolner <davidwoolner@gmail.com>
Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
This commit is contained in:
Meitong Qu
2022-02-11 04:54:42 -08:00
committed by GitHub
parent 97d918b692
commit 9f678e55b9
7 changed files with 202 additions and 120 deletions

View File

@@ -24,7 +24,13 @@ import QueryTable from 'src/SqlLab/components/QueryTable';
interface QueryHistoryProps {
queries: Query[];
actions: Record<string, unknown>;
actions: {
queryEditorSetSql: Function;
cloneQueryToNewTab: Function;
fetchQueryResults: Function;
clearQueryResults: Function;
removeQuery: Function;
};
displayLimit: number;
}