Skip to content

list_view: optional search/filter input #186

@RobLoach

Description

@RobLoach

Problem

nk_console_list_view is the only path to display a large collection (see demo's 200-item example). For anything past a few screens, the only way to find an item is to scroll. There's no first-letter jump, no search box.

Proposed approach

Add an optional search header to the list view widget: when enabled, a textedit at the top filters which indices are shown by re-querying the get_label_callback and matching case-insensitively.

Two possible APIs:

  • A flag on creation: nk_console_list_view_set_searchable(widget, nk_true).
  • Or a separate constructor variant.

Acceptance

  • Demo's 200-item list view picks up the search box.
  • When the filter is empty, behavior is identical to today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions