Skip to content

Any luck with more natural scroll list? #42

Closed
@crazywhalecc

Description

@crazywhalecc

I yesterday tried to contribute to the project to support a natural scroll method, and I realized there is no view state variable. For detail:

  1. My expectation: Only when I scroll to an item outside of the displayed one, do I scroll to the displayed item on the page.
  2. Actual: When I scroll the list (select, multiselect, search), and options count is bigger than height, the highlighted option is always last one of view, related code:
    return $lines->slice($focused - $height + 1, $height);
  3. And I tried to add a variable to render, I realize renderer creates every input time. So I also added a static instance variable to persist this object, but another bug appeared: it will top up the previous window.
  4. As far as I know, the Prompt class is the only one that can be used as storing view state.

I would be happy if you could provide some ideas or if this issue could be resolved appropriately. I don't know if this is more reasonable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions