Giter Club home page Giter Club logo

iconic-multiselect's People

Contributors

sidneywm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

iconic-multiselect's Issues

size of multiselect

Hello,
I'm trying to change the size (height and width) of the iconic multiselect, or to change the maximum number of items to show when the list is open (like maxlength), but I didn't succeed. Is it possible ?
thanks a lot

multibox plugin is not selecting the option-tags

I've a selectbox with option-tags.
Than I am selecting one entry with this plugin, but the correct option-tag don't get the property "selected". This is not connected.

I added this feature on this way

` multiSelect.subscribe(function(event) {
switch (event.action) {
case 'ADD_OPTION':
$(selectorString + " option[value='" + event.value + "']").prop('selected', 'selected');
break;

            case 'REMOVE_OPTION':
                $(selectorString + " option[value='" + event.value + "']").prop('selected', '');
                break;
        }
    });`

multibox is not showing selected entries initial

I've a select box with some selected entries in the html-code.

than i am init the multi-box with

` const multiSelect = new IconicMultiSelect({
select: selectorString,
customCss: true
});

    multiSelect.init();`

but the initial selected option-tags in the selectbox are not visible.

I could add it with

$(selectorString + " option[selected='selected']").each(function() { const value = this.value; const target = Array.from(multiSelect.domElements.options).find(function (el) { return el.dataset.value === value; }); multiSelect._handleOption( target, false); })

for making initial entries are visible.

Setting on multiple select elements via classname does not work

Hi! If you have multiple select elements on a page (e.g. a table with rows and each row has a select form element) you can't set the multiselect plugin on all elements using the class property.

For instance:

    <select class="foobar">
        <option value="bread">Bread</option>
        <option value="cereal">Cereal</option>
        <option value="pasta">Pasta</option>
        <option value="rice">Rice</option>
        <option value="meat">Meat</option>
        <option value="fish">Fish</option>
    </select>

    <select class="foobar">
        <option value="bread">Bread</option>
        <option value="cereal">Cereal</option>
        <option value="pasta">Pasta</option>
        <option value="rice">Rice</option>
        <option value="meat">Meat</option>
        <option value="fish">Fish</option>
    </select>

This bit will only initialize the multiselect on the first select element, not the second:

const foobar = new IconicMultiSelect({
    select: ".foobar",
});

foobar.init();

As a work around, you can do this:

  document.querySelectorAll("select").forEach(function (el) {
      const foobar = new IconicMultiSelect({
          select: "#" + el.id,
      });

      foobar.init();
  })

But this is convoluted, and it requires that every select element has an id property.

How to return a multiselect in form

I put the Multiselect in a form and I want to return the selected item to my app. it did not work. is it needed to add additional options?

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.