Coder Social home page Coder Social logo

Comments (12)

anubra266 avatar anubra266 commented on May 18, 2024 1

@icy-meteor onOpen is the default return of Chakra's useDisclosure. and right, it's a callback that gets fired when something gets opened. But the verb open is just like a variable name, so we say, open the list, when the variable open is true.
Besides, changing this will be a breaking change.

And you can close this if it's working well for you.

from choc-autocomplete.

anubra266 avatar anubra266 commented on May 18, 2024

Could you reproduce this in codesandbox please?

from choc-autocomplete.

rahulsuresh-git avatar rahulsuresh-git commented on May 18, 2024

Give me some time, I'll get back to you with the link.

from choc-autocomplete.

rahulsuresh-git avatar rahulsuresh-git commented on May 18, 2024

https://codesandbox.io/s/choc-ui-autocomplete-input-right-element-flp5b?file=/src/App.tsx

I have replaced the icon with some text for now but it's pretty much the same behaviour. Clicking the doesn't do anything.

from choc-autocomplete.

anubra266 avatar anubra266 commented on May 18, 2024

Hi @icy-meteor You don't have any onClick handler on the inputrightelement. What're you expecting it to do onClick.

from choc-autocomplete.

rahulsuresh-git avatar rahulsuresh-git commented on May 18, 2024

I want it to open the dropdown.

from choc-autocomplete.

anubra266 avatar anubra266 commented on May 18, 2024

Then you have to set an Onclick handler for that

from choc-autocomplete.

anubra266 avatar anubra266 commented on May 18, 2024

Check this out. onOpen and onClose are also exposed as internal state. @icy-meteor

from choc-autocomplete.

rahulsuresh-git avatar rahulsuresh-git commented on May 18, 2024

Yes, I saw this. I couldn't find what is the method exposed to open and close the popup. Neither were there any examples other than isOpen.
Is it onOpen and onClose? That doesn't sound right though.

from choc-autocomplete.

anubra266 avatar anubra266 commented on May 18, 2024

Yeah it's onOpen and onClose

from choc-autocomplete.

rahulsuresh-git avatar rahulsuresh-git commented on May 18, 2024

Okay, maybe we might want to fix the naming convention :)
onOpen sounds more like a callback that gets fired when something is open. Doesn't sound like something that will trigger an open behaviour.

Thanks for the response. I'll try this out.

from choc-autocomplete.

rahulsuresh-git avatar rahulsuresh-git commented on May 18, 2024

LGTM. Thanks.

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.