Coder Social home page Coder Social logo

Comments (8)

justindujardin avatar justindujardin commented on May 18, 2024

+1 for this.

Currently I get around this limitation by destroying elements when I'm done with them, but it would be great to be able to 'destroy' them, returning the HTML elements to their original state.

from select2.

ProLoser avatar ProLoser commented on May 18, 2024

+1 for this.

Something similar to trigger update or something?

Could do elm.select2('refresh')

I need this to address #23

from select2.

ProLoser avatar ProLoser commented on May 18, 2024

Would you have to pass the configuration object every single time? Wouldn't it perhaps be easier to just pass something like elm.select2('refresh')?

from select2.

ivaynberg avatar ivaynberg commented on May 18, 2024

i dont get how this relates to #23. #23 is about updating the selected items when the change() event is fired. this is about updating choices available for selection. these choices are updated every time the select box is opened...

from select2.

ProLoser avatar ProLoser commented on May 18, 2024

I was referring to the problem you originally mentioned, but it sounds like that's not actually an issue because the options list is refreshed Every time you click. If That's the case then everything should work fine for me.

I just figured you would've open the ticket yourself for a reason.

Sent via Hubroid

from select2.

ivaynberg avatar ivaynberg commented on May 18, 2024

ah. sorry. i commented on the wrong issue. thought we were still talking about #23. my bad.

from select2.

ivaynberg avatar ivaynberg commented on May 18, 2024

added destroy method, also more then one initializationis allowed on the same element - old one will be destroyed.

from select2.

drosen0 avatar drosen0 commented on May 18, 2024

Thank you for this.

from select2.

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.