combobox: executing a search #574
-
Are we able to use combo box to search not just the items in the dropdown, but to search the page? Use case: user wants to conduct a new search for something on the page. They start typing and see previous searches show up in the menu but none of those are what they want, so they finish typing their query and hit enter to execute the search. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi @elainelylee. Short answer, kind of yes. We're using Combobox on our doc site for the search. It's not as complex as in there's no previous searches showing up, and we're only allowing users to select an available option from the menu instead of pressing enter. We provide an In the example you're referencing, are the previous searches saved searches or search results? |
Beta Was this translation helpful? Give feedback.
-
saved searches. For example, if someone needs to search a transcript for a
specific phrase, wondering if we can save the phrase so it will show up in
the dropdown. That way they can just select it and run the search. But, if
they want to search for something that's not saved, it will still work.
Alternatively, if that's not possible, the user will need to type in the
same search for every transcript they are assessing.
Elaine Lee
Principal Product Designer - Twilio AI
[image: twilio] <https://www.twilio.com/?utm_source=email_signature>
EMAIL [email protected]
…On Tue, Jul 14, 2020 at 12:32 PM Rich Bachman ***@***.***> wrote:
Hi @elainelylee
<https://urldefense.com/v3/__https://github.com/elainelylee__;!!NCc8flgU!JAkrIwXELIlGd2_aSIpepw3eQ0Y5eNmg_U92v4NvTYyq-GN-fSfjxBGJrhuq$>.
Short answer, kind of yes.
We're using Combobox on our doc site for the search. It's not as complex
as in there's no previous searches showing up, and we're only allowing
users to select an available option from the menu instead of pressing
enter. We provide an optionTemplate prop which can be used to control the
shape of the data for the dropdown. That should cover most use-cases.
In the example you're referencing, are the previous searches saved
searches or search results?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/twilio-labs/paste/discussions/574*discussioncomment-37360__;Iw!!NCc8flgU!JAkrIwXELIlGd2_aSIpepw3eQ0Y5eNmg_U92v4NvTYyq-GN-fSfjxBD8QGZD$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABTIKLEHT5RPCBR3LRUPD5LR3SXEDANCNFSM4OZZ2IXQ__;!!NCc8flgU!JAkrIwXELIlGd2_aSIpepw3eQ0Y5eNmg_U92v4NvTYyq-GN-fSfjxIpIrSB1$>
.
|
Beta Was this translation helpful? Give feedback.
-
I think it would be fine, but most likely the most appropriate pattern would be a normal input of type search and just hook into the browser autocomplete history. If you do it right, the browser will store the previous things you've typed into the search box for you, there's no need to persist those to the server and retrieve them. |
Beta Was this translation helpful? Give feedback.
-
Got it. So use input field and not the combo box.
On Tue, Jul 14, 2020 at 5:07 PM Simon Taggart ***@***.***> wrote:
I think it would be *fine*, but most likely the most appropriate pattern
would be a normal input of type search and just hook into the browser
autocomplete history. If you do it right, the browser will store the
previous things you've typed into the search box for you, there's no need
to persist those to the server and retrieve them.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/twilio-labs/paste/discussions/574*discussioncomment-37473__;Iw!!NCc8flgU!P5zCy9dx1k3SK_MFVC8Esby94OGaxCeOS-tRH2DfuiKnmqSHeUMvqitqQGc7$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABTIKLB24ZRMQWETBNCTIMDR3TXMBANCNFSM4OZZ2IXQ__;!!NCc8flgU!P5zCy9dx1k3SK_MFVC8Esby94OGaxCeOS-tRH2DfuiKnmqSHeUMvqqiUuOQD$>
.
--
Elaine Lee
Principal Product Designer - Twilio AI
[image: twilio] <https://www.twilio.com/?utm_source=email_signature>
EMAIL [email protected]
|
Beta Was this translation helpful? Give feedback.
I think it would be fine, but most likely the most appropriate pattern would be a normal input of type search and just hook into the browser autocomplete history. If you do it right, the browser will store the previous things you've typed into the search box for you, there's no need to persist those to the server and retrieve them.