Code Monkey home page Code Monkey logo

Comments (3)

akomm avatar akomm commented on May 26, 2024 1

Autocomplete in non freeSolo mode should only provide valid options. The behavior is not to automatically select a value as the user types, but when the user confirms it via different interaction methods. This however is not true for the empty value "option". This is applied as value change instantly as the user types.

Example where it is a problem: you track the autocomplete value for changes, without controlling the value (update: its actually synced initially, but does not matter in the case, ignore). You want to execute a navigation when the user picks an item. However, now the user wants to clear the input and type something else, the navigation is executed with an empty value. The empty value is valid in the navigation, so I can't just filter it out, but its not intended to trigger when the user simply wants to search and remove the term he has in the autocomplete.

PS. I can start track to figure out how the clear happened, but my intuition tells me that its maybe not correct for it to behave differently in this case

from material-ui.

kesalkarsaket avatar kesalkarsaket commented on May 26, 2024

@akomm @danilo-leal @mj12albert @zannager where can i find the file where the issue is actually reported. can u please specify the file directory

from material-ui.

oliviertassinari avatar oliviertassinari commented on May 26, 2024

I don't understand the issue. The current behavior looks correct. It's not clear why it should behave differently. Why?

Is this about the trigger happening when the action happens and not on blur? I suspect we have other issues about this topic. It the same idea as to why use onClick and not onMouseDown: to be easier to cancel the action.

note: package scope removed, it's about the Autocomplete component itself, not Material UI styles

from material-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.