Skip to content

Sorting in filepanel does not works when we use searchbar #851

@lazysegtree

Description

@lazysegtree

Describe the bug
Sorting in filepanel does not works when we use searchbar

To Reproduce
Steps to reproduce the behavior:

  1. Put something is searchbar
  2. Try to sort by pressing 'o'

Expected behavior
Sorting should work

Screenshots

Image Image

System information (please complete the following information):
MacOS 15, spf v1.3.0

Its because we have this

		// Get file names based on search bar filter
		if filePanel.searchBar.Value() != "" {
			fileElement = returnDirElementBySearchString(filePanel.location, m.toggleDotFile, filePanel.searchBar.Value())
		} else {
			fileElement = returnDirElement(filePanel.location, m.toggleDotFile, filePanel.sortOptions.data)
		}

And

returnDirElementBySearchString this doesn't have file sorting logic. Only returnDirElement has file sorting logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions