Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Downshift> ignores initialInputValue, initialSelectedItem #1619

Open
david-morris opened this issue Aug 12, 2024 · 0 comments
Open

<Downshift> ignores initialInputValue, initialSelectedItem #1619

david-morris opened this issue Aug 12, 2024 · 0 comments

Comments

@david-morris
Copy link

david-morris commented Aug 12, 2024

  • downshift version: 9.0.8 (also 8.1.0)
  • node version: v18.17.1
  • npm (or yarn) version: pnpm 8.7.5

Relevant code or config

    <Downshift<ItemData>
      onChange={selection => selection && onItemSelected(selection)}
      {...{
        initialInputValue,
        initialSelectedItem,
        onInputValueChange,
        itemToString,
        inputValue,
      }}
      initialInputValue="test"
    >

What you did:
I passed initialInputValue, initialSelectedItem, and then both in an attempt to change the initial value received from getInputProps().

What happened:
Initial value and selected item were empty, and the itemToString function was never called until an item was selected.

Reproduction repository:

None

Problem description:
<Downshift> component did not honor initialInputValue or initialSelectedItem

Suggested solution:

Fix any bug, document any applicable situation where it doesn't make semantic sense for the Downshift component to respect initial values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant