Questions tagged [downshift]

32 questions
5
votes
1 answer

Downshift: The menu should close until results not found

I'm facing a problem with Reactjs frontend codebase. We were using a library name react-autoauggest to achieve the autocomplete functionality but lead has decided to shift from react-autoauggest to downshift. I read through the document of this and…
John Chucks
  • 381
  • 1
  • 15
4
votes
0 answers

How to fetch suggestion values to a drop down list on input change, then fetch value with useCombobox of React Downshift?

My Google Books clone application has a user submit their inputted query, then the response data is displayed. I'd like to implement Downshift's search autocomplete feature so that as the user types their query, a drop down list of suggestions…
ln09nv2
  • 965
  • 4
  • 19
  • 35
4
votes
1 answer

Creating a Kotlin React Wrapper around Paypal Downshift

I've been trying without success to create a Kotlin JS wrapper around the PayPal Downshift library. I can get Downshift to work fine outside the Kotlin ecosystem, but am having no luck when trying to integrate it into a Kotlin JS application. I've…
Grant
  • 41
  • 2
3
votes
1 answer

Downshift + react-window + material-ui

EDIT: I strongly recommend using the new Autocomplete that has a multitude of options and works very well instead of integrating Downshift manually. I've tried to adapt this downshift example (other-examples/react-window) to work with material-ui…
Leo Lozes
  • 1,358
  • 1
  • 15
  • 33
3
votes
1 answer

Downshift autocomplete onBlur resetting value with Formik

I have a form with a field that needs to show suggestions via an api call. The user should be allowed to select one of those options or not and that value that they type in gets used to submit with the form, but this field is required. I am using…
Adrian
  • 151
  • 2
  • 7
3
votes
1 answer

How to use Tab instead of Enter in Downshift to select current menu item?

This is regarding: https://github.com/paypal/downshift I set the onKeyDown handler to recognize Tab key press and I am able to get the highlightedIndex value correctly but how to use that to change the inputValue? import React from 'react' import…
Rounak Jain
  • 409
  • 1
  • 5
  • 18
2
votes
1 answer

Override Downshift ID

I'm trying to override the default ids that Downshift provides. I tried passing the id through getInputProps() like the docs suggest but it did not work. {...getInputProps({ inputId: 'my-input-id' })} Passing the id directly to the input did not…
2
votes
1 answer

How to set input value using downshift in reactjs

I'm creating autocomplete input text box using downshiftjs. When the result of autocomplete is clicked, I can't set the input text. I'm creating the sample code codesandbox.io The autocomplete is working: And it's searchable: When I click the…
Akbar Kautsar
  • 416
  • 5
  • 13
2
votes
1 answer

Allow Downshift useCombobox to select items not in the list

I'm using useCombobox from Downshift as a use-hook-form component and everything works fine except that I can't get the value when a user types in a value not in the list that is passed into useComboBox. onSelectedItemChange is never fired unless…
jabbermonkey
  • 1,680
  • 4
  • 19
  • 37
2
votes
1 answer

Using useComboBox from DownShift with react-hook-form

I'm trying to use useComboBox from DownShift with react-hook-form and the value of the input is always undefined. I started with this: https://codesandbox.io/s/react-hook-form-controller-079xx?file=/src/DonwShift.js And replaced the DownShift.js…
jabbermonkey
  • 1,680
  • 4
  • 19
  • 37
2
votes
0 answers

Focus on first item in Downshift Typeahead

downshift version: 5.2.7 node version: 12.16.2 yarn version:1.22.4 Using the following sandbox provided on Downshift JS's website: https://codesandbox.io/s/simple-downshift-with-getrootprops-example-24s13 I'm attempting to focus on the first…
Delrog
  • 735
  • 2
  • 11
  • 27
2
votes
1 answer

Input field (using downshift) is clearing the entered data when click on div other than submit and input field

The input field is clearing the entered input when I click on any thing in a div other than a submit button and input field. How can I resolve that? Entered input should be present until the submit is happen. I have a div with the input field shown…
Prajna Hegde
  • 670
  • 4
  • 11
  • 31
2
votes
1 answer

getInputProps in Downshift

When I render the input element when using Downshift, is it wrong to do or should I be more specific in which attributes are passed in the object to getInputProps? {...getInputProps({placeholder:…
dmce
  • 222
  • 2
  • 11
2
votes
1 answer

React Downshift autocomplete requests in an infinite loop

I have the following React component class Search extends Component { constructor(props){ super(props); this.state = { suggestions: [] }; this.getSuggestions = this.getSuggestions.bind(this); } renderSuggestion(){ …
SteelSailor
  • 52
  • 10
1
vote
1 answer

Using HTMLFormElement.reset() with Downshift and react-hook-form

I'm using DownshiftJS to create an Autocomplete component using the useCombobox hook. It's all going well and testing with react-hook-form. Unfortunately, I've hit a problem where the reset function available within react-hook-form, which fires the…
Jetchy
  • 222
  • 3
  • 12
1
2 3