mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
fix: Charts sort by in edit mode gets cut off (#15896)
This commit is contained in:
committed by
GitHub
parent
7aeb15031d
commit
5be0a89625
@@ -155,10 +155,10 @@ describe('SliceAdder', () => {
|
||||
});
|
||||
|
||||
it('handleSelect', () => {
|
||||
const newSortBy = { value: 'viz_type' };
|
||||
const newSortBy = 'viz_type';
|
||||
wrapper.instance().handleSelect(newSortBy);
|
||||
expect(spy.calledOnce).toBe(true);
|
||||
expect(spy.lastCall.args[1]).toBe(newSortBy.value);
|
||||
expect(spy.lastCall.args[1]).toBe(newSortBy);
|
||||
});
|
||||
|
||||
it('handleKeyPress', () => {
|
||||
|
||||
@@ -97,6 +97,12 @@ const StyledSelect = styled(AntdSelect, {
|
||||
&& .ant-select-selector {
|
||||
border-radius: ${theme.gridUnit}px;
|
||||
}
|
||||
|
||||
// Open the dropdown when clicking on the suffix
|
||||
// This is fixed in version 4.16
|
||||
.ant-select-arrow .anticon:not(.ant-select-suffix) {
|
||||
pointer-events: none;
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import { List } from 'react-virtualized';
|
||||
import { createFilter } from 'react-search-input';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { Input } from 'src/common/components';
|
||||
import Select from 'src/components/Select';
|
||||
import { Select } from 'src/components';
|
||||
import Loading from 'src/components/Loading';
|
||||
import {
|
||||
CHART_TYPE,
|
||||
@@ -168,8 +168,7 @@ class SliceAdder extends React.Component {
|
||||
}));
|
||||
}
|
||||
|
||||
handleSelect(object) {
|
||||
const sortBy = object.value;
|
||||
handleSelect(sortBy) {
|
||||
this.setState(prevState => ({
|
||||
sortBy,
|
||||
filteredSlices: this.getFilteredSortedSlices(
|
||||
|
||||
Reference in New Issue
Block a user