Skip to content

How to use the virtual list in the shell #2852

Description

@startewho

when i try to use the vlist like this

Image

show the error

ERROR gpui_shell::engine::quickjs: error in virtual list item renderer: `on_item_click` cannot be registered from a virtual list's item renderer: the rows are rebuilt every frame, so a handler registered there would pile up for as long as the view stood. Use `on_item_click((key, cx) => ...)` on the list itself, and read the r
    at <anonymous> (eval_script:36:15)
    at <anonymous> (\\?\D:\Data\Code\gpui-component\examples\js_todolist\main.js?v=2:137:11)
    at map (native)
    at <anonymous> (\\?\D:\Data\Code\gpui-component\examples\js_todolist\main.js?v=2:134:54)

will there a example how to use the vlist in the shell ,or this is a bug?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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