Skip to content

[PickerInput]: can't select items if datasource api return list only if search is typed #2651

@AlekseyManetov

Description

@AlekseyManetov

Description (optional)

If datasource api configured in a such way when api return items only when search is typed, if not - api return empty array. In this case item check became broken, check is not react on click.

It seams that issue related to the DataSource tree load behavior - if search is typed we load items only in visible tree, but checking work based on full tree, which is empty because when search is empty we return empty list.

Steps to Reproduce

  1. Open sandbox - https://codesandbox.io/p/sandbox/uui-forked-z4cm8w?file=%2FExample.tsx%3A10%2C42&workspaceId=1dc5a6c7-6fb2-4cae-8ed5-c1bd7e6e64f0
  2. Type to search more than 3 symbols
  3. Try to check item

Actual result

Item isn't checked

Expected result

Item became checked

Environment

  • UUI version: 5.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions