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

fix: [Select] Fixed the problem that when the search panel is opened,… #2668

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YyumeiZhang
Copy link
Collaborator

… after the search input loses focus, it cannot be focused again by clicking it

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #
复现代码:

import React from 'react';
import { Select } from '@douyinfe/semi-ui';

() => (
    <>
        <Select filter style={{ width: 180 }} placeholder="带搜索功能的单选">
            <Select.Option value="douyin">抖音</Select.Option>
            <Select.Option value="ulikecam">轻颜相机</Select.Option>
            <Select.Option value="jianying">剪映</Select.Option>
            <Select.Option value="xigua">西瓜视频</Select.Option>
        </Select>
    </>
);

问题表现:

关联问题:#2547

  1. 输入搜索内容后,点击面板的【暂无数据】部分,input 失去焦点,点击trigger,想要再次聚焦,input 无法再次聚焦
    20250110114812_rec_
  2. 输入搜索内容后,切换到其他标签页,再次切换回来,input 失去是失去焦点的状态,点击trigger,想要再次聚焦,input 无法再次聚焦
    20250110115026_rec_

Changelog

🇨🇳 Chinese

  • Fix: 修复单选,可搜索的 Select 在面板打开状态下失去焦点后,无法再次通过点击 trigger 聚焦问题

🇺🇸 English

  • Fix: Fixed the problem that after the single-select and searchable Select loses focus when the panel is open, it cannot be focused again by clicking the trigger.

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

… after the search input loses focus, it cannot be focused again by clicking it
@YyumeiZhang YyumeiZhang requested a review from YannLynn January 10, 2025 03:57
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 34786c7:

Sandbox Source
pr-story Configuration

Copy link

cypress bot commented Jan 10, 2025

semi-design    Run #3045

Run Properties:  status check passed Passed #3045  •  git commit ba95f2e828 ℹ️: Merge 34786c7691125d42f75fe7c325a8109bf9043671 into d9e931c738fbae10e59e9536c9ac...
Project semi-design
Branch Review find/select-focus
Run status status check passed Passed #3045
Run duration 08m 10s
Commit git commit ba95f2e828 ℹ️: Merge 34786c7691125d42f75fe7c325a8109bf9043671 into d9e931c738fbae10e59e9536c9ac...
Committer YyumeiZhang
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 11
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 277
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant