Questions tagged [downshift]

32 questions
1
vote
1 answer

Downshift: Set inputValue to value of currently highlighted item on keyboard navigation

Using Downshift, how would one implement settting the inputValue to the value of the currently highlighted item on ArrowUp/ArrowDown while persisting the filtered items until the user manually augments the inputValue? e.g:
Matt Richards
  • 1,477
  • 2
  • 14
  • 21
1
vote
0 answers

How to integrate antd-mobile text input as controlled component with downshift?

I would like to use the autocomplete from downshift in my antd-mobile web-app. I like downshift as it renders external components. Unfortunately I could not figure out, how to 'bind' one of the one / two text input elements from antd-mobile. The…
pico_prob
  • 1,105
  • 10
  • 14
1
vote
4 answers

React | Items.map is not a function

I am using Downshift, in order to create a dropdown that displays some menu options. I created a reusable React component with downshift, but now I get this error: Uncaught TypeError: items.map is not a function at…
user10104341
0
votes
0 answers

You forgot to call the getInputProps getter function on your component / element

Trying to Use : useCombobox props inside of React-bootstrap's Modal, fires errors on the console : downshift: You forgot to call the getInputProps getter function on your component / element. downshift: You forgot to call the getMenuProps getter…
0
votes
0 answers

How to acquire actual event triggered from downshift useSelect item change

I'm using the useSelect hook provided by downshift. I have a situation where I'm unable to change the items passed into useSelect. Each menuItem has a handler that expects the event as a parameter, but I don't see a way to get access to the actual…
sfletche
  • 47,248
  • 30
  • 103
  • 119
0
votes
0 answers

downshift js question: is there a way to flip menu upwards to prevent y-overflow?

the app uses downshift js for an autocomplete dropdown and I can't figure out a way to make it flip upwards when you get to the bottom of the page so it doesn't overflow. I heard popper js may help with this but I haven't seen any examples using…
ju_ro
  • 37
  • 3
0
votes
0 answers

React Downshift library issue

I built a multi select component using the Downshift library. I use useSelect hook. Everything works fine, but there is a small issue that I am not sure if it's a Downshift internal issue or I am doing something wrong. The issue is when I use…
Dito
  • 61
  • 1
  • 3
0
votes
1 answer

Show only an attribute, but save entire object (React Final Form + Downshift)

this problem may have already been solved but the examples that I found did not help me much. downshift version:6.1.0 node version:14.15.4 npm version:6.14.10 react version: 17.0.1 What you did: Tried to show an object attribute on input field,…
nexun
  • 171
  • 1
  • 7
0
votes
1 answer

Passing array of objects to useHook(downshift-js) creates error

I followed the basic-usage in downshift-examples, but changed the array of items to display in the dropdown from starwars (array of strings) to an array of objects (e.g. Id: 1, Description:'item') in shared.js. I also logged a couple of things and…
user2443507
  • 381
  • 1
  • 7
  • 17
0
votes
1 answer

React-Downshift - How to prevent clear by Escape key?

I am using React open source component Downshift to build my custom dropdown. The problem I am facing is that Downshift clears selected item (and calls the onChange callback with null) when user presses Escape key. This clears my dropdown even…
SmxCde
  • 5,053
  • 7
  • 25
  • 45
0
votes
2 answers

Retrieving the key for the entry from material-ui autocomplete at onSelect, instead of value

I'm using React with Material-ui and the Autocomplete component documented here - https://material-ui.com/components/autocomplete/ with downshift. {({ …
themusicalduck
  • 105
  • 1
  • 7
0
votes
1 answer

Can't control Downshift selectedItem prop from parent component using controlled props

I wrote a reusable autocomplete component using Downshift. The component encapsulates a lot of Relay logic for fetching data from my GraphQL endpoint. I have a use case where the parent component needs to receive the selectedItem, display the name…
Matthew Scott
  • 124
  • 1
  • 13
0
votes
1 answer

Downshift in Reactjs - Menu dropdown only displaying selected item

Im having trouble using Downshift, Initially I have all the menu options but once I select one option, thats the only one that shows in the menu the next time I click on it. This is my current code, any feedback on whats causing…
CatGirl19
  • 209
  • 6
  • 18
0
votes
1 answer

Creating a label alongside an input using material-ui's TextField and getInputProps

I am using a material-ui TextField to create an input and a label for a typeahead picker type component with downshift. I've seen the demos, and have got this:
AncientSwordRage
  • 7,086
  • 19
  • 90
  • 173
0
votes
0 answers

React Downshift JS select all onClick

I'd like to get this functionality in a downshift search box component so that when a user clicks on the search box it will select all the text I've tried adding it directly to the input…
jaksco
  • 423
  • 7
  • 18