Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(input): Remove leftover direct usage of Ant Design input #32545

Merged
merged 3 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions superset-frontend/src/components/ListView/Filters/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {

import { t, styled } from '@superset-ui/core';
import Icons from 'src/components/Icons';
import { AntdInput } from 'src/components';
import { Input } from 'src/components/Input';
import { SELECT_WIDTH } from 'src/components/ListView/utils';
import { FormLabel } from 'src/components/Form';
import InfoTooltip from 'src/components/InfoTooltip';
Expand All @@ -47,10 +47,6 @@ const SearchIcon = styled(Icons.Search)`
color: ${({ theme }) => theme.colors.grayscale.light1};
`;

const StyledInput = styled(AntdInput)`
border-radius: ${({ theme }) => theme.gridUnit}px;
`;

function SearchFilter(
{
Header,
Expand Down Expand Up @@ -87,7 +83,7 @@ function SearchFilter(
{toolTipDescription && (
<InfoTooltip tooltip={toolTipDescription} viewBox="0 -7 28 28" />
)}
<StyledInput
<Input
allowClear
data-test="filters-search"
placeholder={t('Type a value')}
Expand Down
1 change: 0 additions & 1 deletion superset-frontend/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export {
Checkbox as AntdCheckbox,
Collapse as AntdCollapse,
Form as AntdForm,
Input as AntdInput,
Select as AntdSelect,
} from 'antd';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* under the License.src/pages/DatabaseList/DatabaseList.test.jsx
*/
import thunk from 'redux-thunk';
import * as reactRedux from 'react-redux';
Expand Down Expand Up @@ -175,7 +175,11 @@ describe('Admin DatabaseList', () => {
});
await waitForComponentToPaint(wrapper);
act(() => {
wrapper.find('button').last().props().onClick();
wrapper
.find({ 'data-test': 'modal-confirm-button' })
.last()
.props()
.onClick();
});

await waitForComponentToPaint(wrapper);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ describe('SavedQueryList', () => {
await waitFor(() => {
const calls = fetchMock.calls(/saved_query\/\?q/);
const lastCall = calls[calls.length - 1][0];
expect(lastCall).toContain('order_column:label');
const url = new URL(lastCall);
const params = new URLSearchParams(url.search);
const qParam = params.get('q');
expect(qParam).toContain('order_column:label');
});
});

Expand Down
Loading