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

Revert "Fix: close select dropdown when focus is shifted" #19838

Merged
merged 1 commit into from
Feb 17, 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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import {
import { CustomPropertyTypeByName } from '../../utils/customProperty';
import {
addMultiOwner,
dropdownVisibility,
removeOwner,
removeOwnersFromList,
} from '../../utils/entity';
Expand Down Expand Up @@ -220,14 +219,6 @@ entities.forEach((EntityClass) => {
);
});

test("Tags and Glossary Term dropdown shouldn't be visible on tab change", async ({
page,
}) => {
await dropdownVisibility(page, 'tags');
await page.getByRole('tablist').getByRole('tab').first().click();
await dropdownVisibility(page, 'glossary');
});

// Run only if entity has children
if (!isUndefined(entity.childrenTabId)) {
test('Tag Add, Update and Remove for child entities', async ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,24 +709,6 @@ export const removeGlossaryTermFromChildren = async ({
}
};

export const dropdownVisibility = async (page: Page, tagType: string) => {
await page
.getByTestId('entity-right-panel')
.getByTestId(`${tagType}-container`)
.getByTestId('add-tag')
.click();
await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeVisible();

await page.getByTestId('activity_feed').click();

await expect(page.getByTestId('saveAssociatedTag')).not.toBeVisible();
};

export const upVote = async (page: Page, endPoint: string) => {
const patchRequest = page.waitForResponse(`/api/v1/${endPoint}/*/vote`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ const AsyncSelectList: FC<AsyncSelectListProps & SelectProps> = ({
style={{ width: '100%' }}
tagRender={customTagRender}
onChange={handleChange}
onDropdownVisibleChange={(open) => !open && onCancel?.()}
onInputKeyDown={(event) => {
if (event.key === 'Backspace') {
return event.stopPropagation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
treeData={treeData}
treeExpandedKeys={isEmpty(searchOptions) ? undefined : expandedRowKeys}
onChange={handleChange}
onDropdownVisibleChange={(open) => !open && onCancel?.()}
onSearch={onSearch}
onTreeExpand={setExpandedRowKeys}
{...props}
Expand Down
Loading