Giter Club home page Giter Club logo

angular-multi-select's Introduction

Angular Multi Select Build Status Logo

Angular directive which creates the fastes dropdown you'll find. It offers single or multiple selection modes and a wide range of output formats.

How fast is it?

VERY fast. You won't find anything faster. The demos I work with are made of ~45.000 objects built with the utils/generate_big_dataset.js script, and the directive is able to check, validate, process and insert the entire data in ~1.5 seconds. You can get even faster than that if you craft your input data carefully (see docs).

Screenshot

Demo & How To

Go to http://alexandernst.github.io/angular-multi-select

Change Log

See CHANGELOG.md.

Installing

You can download this library from npm.

npm install angular-multi-select

Building

You'll need to install Node (because you need NPM) and Grunt. The first one is up to you. You can use your distro's package manager, binaries from Node's webpage, etc. As for the second one: npm install -g grunt-cli. After that you must install all dependencies: npm install. Last, you just need to run grunt and everything will build.

Bug Reporting

Please follow these steps:

  1. READ THE MANUAL AGAIN. You might have missed something. This includes the MINIMUM ANGULARJS VERSION and the SUPPORTED BROWSERS.
  2. The next step is to search in Github's issue section first. There might already be an answer for similar issue. Do check both open and closed issues.
  3. If there's no previous issue found, then please create a new issue in https://github.com/alexandernst/angular-multi-select/issues.
  4. Please replicate the problem in JSFiddle or Plunker (or any other online JS collaboration tool), and include the URL in the issue you are creating.

Licence

See LICENSE.txt.

angular-multi-select's People

Contributors

alazaro avatar alexandernst avatar allanwsilva avatar buunguyen avatar corydorning avatar erinwu avatar fifonik avatar filaruina avatar flextras avatar greggroth avatar hypercubed avatar isteven avatar jtbdevelopment avatar omkarv avatar panayotkulchev avatar riggs333 avatar wekyle avatar zachlysobey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-multi-select's Issues

Output filter does not contain pre-selected input

Hi,

when I set the checked property to true in the input-model, the output-model does not update until the user select an other item.

ex:
$scope.inputmodel= [
{ name: "{{row.name}}", checked: true }
{ name: "{{row.name}}", checked: true }
{ name: "{{row.name}}", checked: false}
];

the output model stay empty ( [] ).

Thanks
Raph

Menu items repeat when using the search box

I'm trying to implement the search area on the drop-down. Initially the search functionality works fine, but when you start removing characters from the search field, the list items in the drop down start behaving erratically. Some items are being repeated, while other items are being removed from the list.

Here is a plunkr to demonstrate the issue : http://plnkr.co/edit/uPvfSJ8IngeFFGAcHvMd?p=preview

I would imagine this is an error on how I'm implementing the search field, rather than a bug in the directive. Either way, if you have any suggestions I would love to hear them.

Thanks

Filter doesn't work for simple cases

The filtering doesn't work unless you are doing Grouping. For examples see the Minimal Demo or the Dynamic Update demo. If you type in the search box it doesn't limit what you see.

Create helper functions

Create a helper functions that would allow to do programatically:

  • select all
  • select none
  • select by id
  • reset
  • clear
  • open
  • close

Fast removing letters from the search field makes the browser go back in history

This is actually caused because the backspace key makes the browser go back in history, and because removing a letter causes an immediate search, the input gets blocked and stops receiving events, thus the backspace key triggering a "back in history" event.

One possible solution is to delay the start of the filter by a few ms.

Небольшой глюк

Здравствуйте. Использую ваш плагин. Но проблема вот в чем:
У меня есть, например, модель:

[{
name:'Test'
 sub: [
{name: 'Вася'},
{name: 'Петя'}
]
},
{
name:'Test2'
 sub: [
{name: 'Коля'},
{name: 'Вася'}

]
}
]

Когда я делаю поиск по имени Вася, то все Васи найдены.
Когда я стираю из строки поиска то, что ввел, то во второй группе Коля заменяется Васей.


Даже тут http://alexandernst.github.io/angular-multi-select/#/demo-grouping
Если ввести несколько раз слово Chrome, в первой группе все будет заменено на Chrome. При бэкспейсе - то же самое.

Pill design

Can you support ability to clear a selection from the header (with an x next to selection)
capture

Two way binding on the output

Hi,

It could be great if the output-model would bind in the two way. If I clear my model, I would like the directive unselect all entries in the UI.

Thanks in advance

Slow with large data-sets

I'm loading 6 of these with ~1400 small objects each, and this makes it pretty unusable. If I get a chance, I'll try to put together a minimal demo, but in my app I'm developing it seems significantly slower than the isteven project version (which itself performs too slowly on this large a dataset).

Allow disabled items

Disabled items could be an option, but I'm not sure how would they behave.

If a disabled item's parent is checked, should the disabled item get checked too?

Plan for v6

Version 5 works quite well with small/medium data sets, but it's dog slow with big data sets (500+ items). Given the fact that there are some other issues that must be fixed as well, and those require some refactoring too, and the UI part needs to be redone with CSS3 (flex box), there is no reason to limit the project to what is done currently. A complete rewrite will be easier.

Those are the main features that will be worked on:

Faster data structure

Of course, the current data structure that is used to initialize the directive is fine and should probably be kept as it is, but internally some other type of data structure should be used that will allow a faster data access.

The data structure should allow doing the following operations in a fast way:

  • Walk the entire data set (if possible, without recursions)
  • Get first level children from a node
  • Get all children from a node
  • Get the parent from a random node

Also, use http://weaver.js.org/ to make the entire process faster.

Faster tick checker

Probably a separate data structure that would help in the process of checking which items are checked will be required.

ES6?

Decide if Babel/Typescript should be used

Searching

Searching is yet another important feature. We can't iterate over each item and perform a regex. Therefore, something else (like http://lunrjs.com/) should be used.

UI

The UI should be rewritten with flex box.

Backwards compatibility

Backwards compatibility should be kept. There is no reason to break it (but it could be broken if needed).

Improve CSS

  • - Better class names
  • - Open widget applying certain logic for the positioning
  • - Others

Make it possible to use scope variables as keys in a label object

Currently item-label will receive a format delimited by {| |} and then it will interpolate it against the item itself. This makes it impossible to use a variable as a key in the object. Example:

$scope.lang = "en";
$scope.data = { "en": "hi", "es": "hola" };

...

item-label="{| data[lang] |}"

output-model getting updated after on-item-click callback is triggered

Hi,

I need to call a function every time an item is clicked. This function needs to have the list of the selected item from the multi-select and is triggered by on-item-click directive. However, the output-model gets updated only after the callback function have been called.

I think the output model should be updated before the callback is triggered.

bower packaging

is there some reason you are not using npm/bower correctly and putting all your dependencies in the bower.json and correct publish details in there? If you did so this package would work properly like all other bower packages for client side where a) it auto updates your index.html and b) has the dependencies built in?

I have forked and will look at fixing but unclear why this wasn't done in first place. the npm packages.json should just be containing what you need to run the build and test harnesses.

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.