Skip to content

[BUG] react19 @douyinfe/semi-ui-19的TimePicker组件开启无限滚动效果后会出现时间选择列表自动无限滚动 #3107

@LoongMH

Description

@LoongMH

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

TimePicker

Semi Version

react19 @douyinfe/semi-ui-19 2.90.1

Current Behavior

TimePicker组件开启无限滚动效果后,点击时间选择列表的值,组件没有及时渲染,经过两三次点击后,时间选择列表会自动无限循环滚动。
关闭无限滚动效果后可以正常选择值,组件也能正常渲染。

Expected Behavior

TimePicker组件开启无限滚动效果和关闭无限滚动效果的行为一致,能正常选择值

Steps To Reproduce

No response

ReproducibleCode

import { TimePicker } from '@douyinfe/semi-ui-19';
import { useState } from "preact/hooks";

function App() {
  const [value, setValue] = useState(null);

  async function setWorkTimeRange(time) {
    console.log('何意味');
    setValue(time);
  }

  return (
    <div>
      <TimePicker onChange={setWorkTimeRange} scrollItemProps={{ mode: "wheel", cycled: true }} type='timeRange' value={value} />
    </div>
  );
}

export default App;

Environment

- OS:
- browser:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions