mirror of
https://github.com/apache/superset.git
synced 2026-09-07 15:54:55 +00:00
fix(table-chart): fix "Search by" control visibility and improve table controls layout (#36073)
Co-authored-by: SBIN2010 <Sbin2010@mail.ru>
This commit is contained in:
+8
-9
@@ -17,14 +17,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { styled } from '@apache-superset/core/theme';
|
||||
import { RawAntdSelect } from '@superset-ui/core/components';
|
||||
import { RawAntdSelect as Select } from '@superset-ui/core/components';
|
||||
import { SearchOption } from '../../types';
|
||||
|
||||
const StyledSelect = styled(RawAntdSelect)`
|
||||
width: 120px;
|
||||
margin-right: 8px;
|
||||
`;
|
||||
import { SupersetTheme, css } from '@apache-superset/core/theme';
|
||||
|
||||
interface SearchSelectDropdownProps {
|
||||
/** The currently selected search column value */
|
||||
@@ -41,10 +36,14 @@ function SearchSelectDropdown({
|
||||
searchOptions,
|
||||
}: SearchSelectDropdownProps) {
|
||||
return (
|
||||
<StyledSelect
|
||||
<Select
|
||||
className="search-select"
|
||||
value={value || (searchOptions?.[0]?.value ?? '')}
|
||||
css={(theme: SupersetTheme) => css`
|
||||
width: ${theme.sizeUnit * 30}px;
|
||||
`}
|
||||
value={value ?? searchOptions?.[0]?.value}
|
||||
options={searchOptions}
|
||||
size="small"
|
||||
onChange={onChange}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user