mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +00:00
feat(explore): Implement data panel redesign (#19751)
* feat(explore): Redesign of data panel * Auto calculate chart panel height and width * Add tests * Fix e2e tests * Increase collapsed data panel height
This commit is contained in:
committed by
GitHub
parent
34323f9b5f
commit
594523e895
@@ -67,41 +67,56 @@ export const CopyButton = styled(Button)`
|
||||
}
|
||||
`;
|
||||
|
||||
const CopyNode = (
|
||||
<CopyButton buttonSize="xsmall" aria-label={t('Copy')}>
|
||||
<i className="fa fa-clipboard" />
|
||||
</CopyButton>
|
||||
);
|
||||
|
||||
export const CopyToClipboardButton = ({
|
||||
data,
|
||||
columns,
|
||||
}: {
|
||||
data?: Record<string, any>;
|
||||
columns?: string[];
|
||||
}) => (
|
||||
<CopyToClipboard
|
||||
text={
|
||||
data && columns ? prepareCopyToClipboardTabularData(data, columns) : ''
|
||||
}
|
||||
wrapped={false}
|
||||
copyNode={CopyNode}
|
||||
/>
|
||||
);
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<CopyToClipboard
|
||||
text={
|
||||
data && columns ? prepareCopyToClipboardTabularData(data, columns) : ''
|
||||
}
|
||||
wrapped={false}
|
||||
copyNode={
|
||||
<Icons.CopyOutlined
|
||||
iconColor={theme.colors.grayscale.base}
|
||||
iconSize="l"
|
||||
aria-label={t('Copy')}
|
||||
role="button"
|
||||
css={css`
|
||||
&.anticon > * {
|
||||
line-height: 0;
|
||||
}
|
||||
`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const FilterInput = ({
|
||||
onChangeHandler,
|
||||
}: {
|
||||
onChangeHandler(filterText: string): void;
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
const debouncedChangeHandler = debounce(onChangeHandler, SLOW_DEBOUNCE);
|
||||
return (
|
||||
<Input
|
||||
prefix={<Icons.Search iconColor={theme.colors.grayscale.base} />}
|
||||
placeholder={t('Search')}
|
||||
onChange={(event: any) => {
|
||||
const filterText = event.target.value;
|
||||
debouncedChangeHandler(filterText);
|
||||
}}
|
||||
css={css`
|
||||
width: 200px;
|
||||
margin-right: ${theme.gridUnit * 2}px;
|
||||
`}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user