Skip to content

[Bug] 表格树形结构搜索高亮问题 #5071

@cunmo

Description

@cunmo

Version

1.23.2

Link to Minimal Reproduction

表格是树形数据时候,搜索都可以复现

Steps to Reproduce

useEffect(() => {
  if (!tableInstanceRef?.current) return;
  searchRef.current = new SearchComponent({
    table: tableInstanceRef?.current,
    autoJump: true,
  });
}, [tableInstanceRef?.current, tableData]);

const searchHandler = () => {
if (!searchRef?.current || !searchValue) return;
try {
searchRef?.current?.search(searchValue);
} catch (error) {
console.warn('Search failed:', error);
}
};

const nextClickHandler = () => {
if (!searchRef?.current || !searchValue) return;
searchRef?.current?.next();
};

const prveHandlerContext = () => {
    if (!searchRef?.current || !searchValue) return;
    searchRef?.current?.prev();
};

Current Behavior

Image 如上图所示当我的数据是 树形 结构的时候,搜索会高亮一整行,匹配错误 Image 如上图所示当我的数据是普通单层结构的时候,搜索结果高亮正常,且上下翻滚全部都正常

Expected Behavior

期望是表格树形状结构的时候 也能正确高亮和上下翻滚切换

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions