GithubHelp home page GithubHelp logo

Comments (6)

anubra266 avatar anubra266 commented on August 27, 2024

You can use the AutoCompleteInput on InputGroup just like the normal chakra Input

from choc-autocomplete.

jamesopti avatar jamesopti commented on August 27, 2024

You can use the AutoCompleteInput on InputGroup just like the normal chakra Input

Doesn't this line always render an Input element? https://github.com/anubra266/choc-autocomplete/blob/main/src/autocomplete-input.tsx#L48-L49

How would I go about using something like this:

<InputGroup>
  <InputLeftElement
    pointerEvents="none"
    children={<PhoneIcon color="gray.300" />}
  />
  <Input type="tel" placeholder="Phone number" />
</InputGroup>

from choc-autocomplete.

anubra266 avatar anubra266 commented on August 27, 2024

Just replace <Input type="tel" placeholder="Phone number" /> with <AutoCompleteInput type="tel" placeholder="Phone number" />

from choc-autocomplete.

anubra266 avatar anubra266 commented on August 27, 2024

There's an example here

from choc-autocomplete.

jamesopti avatar jamesopti commented on August 27, 2024

There's an example here

Thanks for the example! I realized that my issue is using multi-select with tags. In this case, the icon always stays at the top.

Here's a codesandbox fork showing the issue!

https://codesandbox.io/s/chakra-autocomplete-demo-forked-24le3?file=/src/multi-select.js

from choc-autocomplete.

anubra266 avatar anubra266 commented on August 27, 2024

Hi @jamesopti check this out

https://codesandbox.io/s/chakra-autocomplete-demo-forked-9tsov?file=/src/multi-select.js

from choc-autocomplete.

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.