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:
innovark
2026-07-01 17:22:36 -07:00
committed by GitHub
co-authored by SBIN2010
parent af0a55a4f3
commit b3197c9b5e
5 changed files with 58 additions and 62 deletions
@@ -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}
/>
);