Move search suggestion logic to selector #67

Merged
neb-b merged 1 commit from autcomplete into master 2018-08-20 03:34:05 +02:00
neb-b commented 2018-08-14 22:49:09 +02:00 (Migrated from github.com)

Changes

  • Default first suggestion to be a search
  • Most of the search suggestion logic is now in a selector
  • Just pass in the api results to the search reducer with a query key so previous suggestions are preserved when using the backspace/retyping the same query
### Changes - Default first suggestion to be a search - Most of the search suggestion logic is now in a selector - Just pass in the api results to the search reducer with a `query` key so previous suggestions are preserved when using the backspace/retyping the same query
skhameneh (Migrated from github.com) reviewed 2018-08-14 22:49:09 +02:00
akinwale (Migrated from github.com) approved these changes 2018-08-15 22:07:10 +02:00
akinwale (Migrated from github.com) left a comment

Looks good.

Looks good.
@ -40,0 +58,4 @@
// They are probably typing/pasting in a lbry uri
return [
{
value: query,
akinwale (Migrated from github.com) commented 2018-08-15 22:06:43 +02:00

Just an idea I had. I was thinking we should have an additional selector called selectLocalSearchSuggestions which could possibly be used in cases where an API call doesn't necessarily have to be made.

Just an idea I had. I was thinking we should have an additional selector called `selectLocalSearchSuggestions` which could possibly be used in cases where an API call doesn't necessarily have to be made.
neb-b (Migrated from github.com) reviewed 2018-08-20 03:33:52 +02:00
@ -40,0 +58,4 @@
// They are probably typing/pasting in a lbry uri
return [
{
value: query,
neb-b (Migrated from github.com) commented 2018-08-20 03:33:52 +02:00

Maybe based on previous searches?

Maybe based on previous searches?
neb-b commented 2018-08-20 03:34:40 +02:00 (Migrated from github.com)

@akinwale I'll create a PR to lbry-android after adding this into the app. The changes should be very minor.

@akinwale I'll create a PR to lbry-android after adding this into the app. The changes should be very minor.
akinwale (Migrated from github.com) reviewed 2018-08-20 08:29:29 +02:00
@ -40,0 +58,4 @@
// They are probably typing/pasting in a lbry uri
return [
{
value: query,
akinwale (Migrated from github.com) commented 2018-08-20 08:29:29 +02:00

Yeah, that makes sense.

Yeah, that makes sense.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-redux#67
No description provided.