Git Product home page Git Product logo

Comments (3)

TonyBrobston avatar TonyBrobston commented on June 27, 2024

I'm also open to work arounds if there are any. I tried a handful of things with no success.

from material-ui.

ZeeshanTamboli avatar ZeeshanTamboli commented on June 27, 2024

@TonyBrobston, I didn't understand your issue. Can you provide reproduction steps using an example from the Autocomplete docs or a live example on CodeSandbox or StackBlitz? What is the "current behavior" vs. the "expected behavior"?

The Autocomplete component already has an autoSelect prop. Check it out in this playground: https://mui.com/material-ui/react-autocomplete/#playground.

API docs: https://mui.com/material-ui/api/autocomplete/#autocomplete-prop-autoSelect.

Does that work for you?

from material-ui.

TonyBrobston avatar TonyBrobston commented on June 27, 2024

@TonyBrobston, I didn't understand your issue. Can you provide reproduction steps using an example from the Autocomplete docs or a live example on CodeSandbox or StackBlitz? What is the "current behavior" vs. the "expected behavior"?

The Autocomplete component already has an autoSelect prop. Check it out in this playground: https://mui.com/material-ui/react-autocomplete/#playground.

API docs: https://mui.com/material-ui/api/autocomplete/#autocomplete-prop-autoSelect.

Does that work for you?

Hey @ZeeshanTamboli

Here is a super rough example: https://codesandbox.io/p/sandbox/icy-violet-j2nf2f?file=%2Fsrc%2FDemo.tsx%3A36%2C19

When you click "Edit" for the Date, when the DatePicker is rendered, the value in the field is focused and selected. When you click "Edit" for the TextField, when the TextField is rendered, the TextField is focused, but the value is not selected.

The desire is to have the TextField have an option to function the same way, to also select the text as the user is going to overwrite the value.

Does this help?

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.