GithubHelp home page GithubHelp logo

Comments (6)

jquense avatar jquense commented on July 19, 2024

Hey there, if I am understanding you, you are looking a handler for adding custom tags to the Select widget? Such as if typing "dog" returned no list items, but you had the option to add it to the list through a onCreate handler? If so then I definitely have a few places to take a look at for implementing, there are also a few questions about how best to implement it.

Let me know if we are on the same page and I can offer up my thoughts further :)

from react-widgets.

nelix avatar nelix commented on July 19, 2024

Yep, thats the goal

from react-widgets.

jquense avatar jquense commented on July 19, 2024

sounds good :) if you look here you can see where I punted on implementing this. Firing off a onCreate there with the input.value will get you most of the way there.

The last bit to this is the option to create tags with the mouse, and not just hitting the enter key. Ideally I think we need to add an option to the bottom of the dropdown list. That may involve some messing around with the css to get the scrolling right.

two options there:

  • add a dummy item to the processedData state (can be done in the process method)
  • and a an element under the list.

opt 2 is the most straight forward but will lead to issues with the keyboard list navigation (since its not in the list). Opt 1 is sort of ugly and needs to make sure not to mess with the prop array so not to mutate passed in data.

those are my thoughts, feel free to give anything a go.

from react-widgets.

nelix avatar nelix commented on July 19, 2024

Awesome thats a pretty great inroad, I'll get started with the first bit in our fork and see how I go. Thanks!

from react-widgets.

jquense avatar jquense commented on July 19, 2024

Just a ping @nelix . I ran into a need for this myself today and remembered you were working on it before I started implementing (luckily). Any news?

from react-widgets.

nelix avatar nelix commented on July 19, 2024

I have been on leave from work, so I have not made much progress; Sorry to disappoint :(

from react-widgets.

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.