question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AutocompleteInput suggestions list location in filters

See original GitHub issue

General description In filters of a List module, if a ReferenceInput with AutocompleteInput is moved after adding/removing another filter, the suggestions list stays at the old location.

What you were expecting:

When I add a new filter, I want the suggestions list of the previous AutocompleteInput to be moved to the right place.

What happened instead:

When a new filter is added/removed to a List, the AutocompleteInput is moved to the right place, but the suggestions list opens at the old location of the filter.

Steps to reproduce:

When adding a filter: ezgif-3-e5904e8e53

When removing a filter: ezgif-3-933ddc5008

Related code:

const OrderFilters = props => (
  <Filter {...props}>
    <TextInput source="company" />
    <ReferenceInput
      source="customer_id"
      reference="customer"
      allowEmpty
    >
      <AutocompleteInput optionText="name" />
    </ReferenceInput>
    <ReferenceInput
      source="carrier_id"
      reference="carrier"
      allowEmpty
    >
      <AutocompleteInput optionText="name" />
    </ReferenceInput>
  </Filter>
);

const OrderList = props => (
<List {...props} filters={<OrderFilters />}>
 [...]
</List>

Other information:

No error stacktrace.

Environment

  • React-admin version: 2.2.3
  • Last version that did not exhibit the issue (if applicable): unknown
  • React version: 16.4.13
  • Browser: Chrome 68.0.3440.106

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
selenyillarcommented, Feb 24, 2019

Can you please also add this solution on AutocompleteInput? With this commit, now it seems only the AutocompleteArrayInput has fixed.

2reactions
tiagoschenkelcommented, Feb 25, 2019

@selenyillar, #2928 solves the problem also for AutocompleteInput.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AutocompleteInput suggestions are not working - Stack Overflow
I'm working on a project in react-admin and am trying to use an AutocompleteInputs within ReferenceInputs for Filter in a List.
Read more >
The AutocompleteInput Component - React-admin - Marmelab
An array of objects that represents the possible suggestions. ... getList() using the string as filter, to return a filtered list of possible...
Read more >
Place Autocomplete | Maps JavaScript API - Google Developers
The radio buttons allow you to filter the types of predictions that the autocomplete returns. The Strict Bounds option ... Autocomplete(input, options);
Read more >
Address Autocomplete | Maps API - Geoapify
You can also set biases and filters to make your search even more accurate. ... You have a map and you want to...
Read more >
Autocomplete Input - FormKit
The autocomplete input allows you to search through a list of options. ... The autocomplete input will filter options with its own internal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found