Skip to content

Add search field below principal buttons - #2546

Merged
Wires77 merged 5 commits into
PathOfBuildingCommunity:devfrom
jabaruben:master
May 20, 2021
Merged

Add search field below principal buttons#2546
Wires77 merged 5 commits into
PathOfBuildingCommunity:devfrom
jabaruben:master

Conversation

@jabaruben

Copy link
Copy Markdown
Contributor

Added a Search Field just down principal buttons and a "Search" button and a "Clear" button.

@Wires77Wires77 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening this PR, it seems like a nice addition to PoB.

I left some in-line comments for general improvements, but overall I think this should be done in a different way. Most other search boxes in PoB do not need a button to search, they're simply a filter that automatically filters the list as you type. It looks like doing the same here would require some modifications to the BuildListControl, as the naive solution would be to run NewFileSearch each time the search parameters changed, which would get pretty expensive. I'd take a look at ItemDBControl for an example of loading the entire list and filtering those contents instead.

Comment threadsrc/Modules/BuildList.lua Outdated
Comment threadsrc/Modules/BuildList.lua Outdated
Comment threadsrc/Modules/BuildList.lua Outdated
Comment threadsrc/Modules/BuildList.lua Outdated
@Wires77Wires77 added the enhancement New feature, calculation, or mod label Apr 15, 2021
jabarubenand others added 3 commits April 16, 2021 01:49
@jabaruben

Copy link
Copy Markdown
ContributorAuthor

Thank you for opening this PR, it seems like a nice addition to PoB.

I left some in-line comments for general improvements, but overall I think this should be done in a different way. Most other search boxes in PoB do not need a button to search, they're simply a filter that automatically filters the list as you type. It looks like doing the same here would require some modifications to the BuildListControl, as the naive solution would be to run NewFileSearch each time the search parameters changed, which would get pretty expensive. I'd take a look at ItemDBControl for an example of loading the entire list and filtering those contents instead.

Now i'm checking EditControl.lua in order to learn how to do this. You have an 'enterFunc' that will be triggered when you push enter button and no lineHeight is assigned (editControls with only one row).

I implemented it.... could you check it?

I don't know very well how to proceed in order to update this PR with new changes... i'm a little newby with GitHub :(

@jabaruben
jabaruben requested a review from Wires77April 16, 2021 01:12
Comment threadsrc/Modules/BuildList.lua
@Wires77
Wires77 merged commit 914d45e into PathOfBuildingCommunity:devMay 20, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jabaruben@Wires77