Skip to content

Commit

Permalink
Merge pull request #2029 from innovaccer/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
satyamyadav authored Nov 20, 2023
2 parents 15f9c6c + c7b89ef commit f04124e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion core/components/atoms/dropdown/DropdownList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ const DropdownList = (props: OptionsProps) => {
}
};

const enableSearch = (withSearch || props.async) && (!isDropdownListBlank || errorType === 'NO_RECORDS_FOUND');
const enableSearch = withSearch || props.async;

return (
//TODO(a11y)
Expand Down
8 changes: 0 additions & 8 deletions core/components/atoms/dropdown/__tests__/Dropdown.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,6 @@ describe('Dropdown component with search', () => {
expect(screen.getByPlaceholderText('Custom search text')).toBeInTheDocument();
});

it('is not rendered when no record is available', () => {
const { getByTestId, queryByTestId } = render(<Dropdown withSearch={true} />);
const dropdownTrigger = getByTestId(trigger);
fireEvent.click(dropdownTrigger);

expect(queryByTestId('DesignSystem-Input')).not.toBeInTheDocument();
});

it('is rendered when search returns no result', async () => {
const { getByTestId, getAllByTestId } = render(<Dropdown options={storyOptions} withSearch={true} />);

Expand Down

0 comments on commit f04124e

Please sign in to comment.