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.

The AutoCompleteInput Form always reloaded when type some string

See original GitHub issue

What you were expecting: The AutoCompleteInput doesnt reloaded the input form when type some string

What happened instead: The AutoCompleteInput reloaded the input form when type some string and make us to repeat type

Related code:

<Filter {...props}>
      <ReferenceInput label="Consultant" source="consultant_id" reference="consultants" sort={{ field: 'full_name', order: 'ASC' }}>
        <AutocompleteInput optionText="full_name"
          shouldRenderSuggestions={(val: string) => {
            return val.trim().length > 2;
          }} />
      </ReferenceInput>
    </Filter>

Other information: This the video https://drive.google.com/file/d/1me268LGar3wg17F8Xh0b-3eV5R7aIOfY/view?usp=sharing Environment

  • React-admin version: 3.11.2
  • Last version that did not exhibit the issue (if applicable):
  • React version: 17.0.1
  • Browser: Chrome Version 90.0.4430.85 (Official Build) (64-bit)
  • Stack trace (in case of a JS error):

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ngnclht1102commented, May 19, 2021

Same here, I also encountered the same problem. It is successfully filtered, but after that, it is reloading.

It only happened on edit mode, on create mode, it works perfectly

https://user-images.githubusercontent.com/6987730/118801403-2abf8b00-b8cb-11eb-9be4-e56e152b5797.mov

0reactions
fzaninottocommented, Jul 21, 2022

No news for some time, closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using parse/format with AutoCompleteArrayInput and ... - GitHub
It seems to just take my first character and then just clear the filter value, meaning I cannot search on a string with...
Read more >
How to stop page refresh on typing in Form input?
I'm facing an issue where when a user types in input[type='text'], it causes my controller to refresh. Also, on clicking the button, the...
Read more >
HTML attribute: autocomplete - MDN Web Docs
The HTML autocomplete attribute lets web developers specify what if any permission the user agent has to provide automated assistance in ...
Read more >
Semantic Form - metaphactory documentation
Semantic Form is a highly configurable component for creation of authoring ... However, manual field definitions and custom markup always take precedence.
Read more >
Autocomplete Widget - jQuery UI API Documentation
When typing in the autocomplete field, the plugin starts searching for entries that match and displays a list of values to choose from....
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