mirror of
https://github.com/apache/superset.git
synced 2026-04-23 01:55:09 +00:00
fix(sqllab): make to hide the delete button of most recent query history (#19358)
This commit is contained in:
@@ -31,6 +31,7 @@ const mockedProps = {
|
||||
removeQuery: NOOP,
|
||||
},
|
||||
displayLimit: 1000,
|
||||
latestQueryId: 'yhMUZCGb',
|
||||
};
|
||||
|
||||
const setup = (overrides = {}) => (
|
||||
|
||||
@@ -32,6 +32,7 @@ interface QueryHistoryProps {
|
||||
removeQuery: Function;
|
||||
};
|
||||
displayLimit: number;
|
||||
latestQueryId: string | undefined;
|
||||
}
|
||||
|
||||
const StyledEmptyStateWrapper = styled.div`
|
||||
@@ -45,7 +46,12 @@ const StyledEmptyStateWrapper = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
const QueryHistory = ({ queries, actions, displayLimit }: QueryHistoryProps) =>
|
||||
const QueryHistory = ({
|
||||
queries,
|
||||
actions,
|
||||
displayLimit,
|
||||
latestQueryId,
|
||||
}: QueryHistoryProps) =>
|
||||
queries.length > 0 ? (
|
||||
<QueryTable
|
||||
columns={[
|
||||
@@ -61,6 +67,7 @@ const QueryHistory = ({ queries, actions, displayLimit }: QueryHistoryProps) =>
|
||||
queries={queries}
|
||||
actions={actions}
|
||||
displayLimit={displayLimit}
|
||||
latestQueryId={latestQueryId}
|
||||
/>
|
||||
) : (
|
||||
<StyledEmptyStateWrapper>
|
||||
|
||||
Reference in New Issue
Block a user