pc035860 / ngSelect

An AngularJS module that transforms any HTML element on the page to selectable components.
http://pc035860.github.io/ngSelect/example/
MIT License
72 stars 11 forks source link

lasso and keyboard support #1

Open devmondo opened 11 years ago

devmondo commented 11 years ago

hi, awesome work there, can we have ability to drag to select and also using Shift and Ctrl keys like in windows explorer?

thanks in advanced.

pc035860 commented 11 years ago

Hello @devmondo,

I think the support of Shift and Ctrl keys is pretty nice idea. I'll add it to my todo list, see how to implement it as an option.

As for the drag to select functionality, since in my point of view, ngSelect is more of a function-based directive rather than an ui-based directive, currently it wouldn't be considered for implementation. It still a really nice idea, and thanks for your suggestions.

devmondo commented 11 years ago

thanks for the fast response,

regarding drag, you might be right, but the way i see it is when we are already using mouse to select items then we are interacting with UI, so there is no harm into adding drag functionality, otherwise we would have to resort to jquery UI, and this will cause problems, because i think this will create a conflict.

if we get all those functionalaties then there is no need for jquery UI and we will have a full fledged module that will support all modern applications needs. which would be awesome

pc035860 commented 11 years ago

Good point and you got me. Drag to select in coming weeks!

devmondo commented 11 years ago

awesome man, this will makes us ditch jquery ui all together, please don't forget shift and ctrl keys support :)

pluff commented 10 years ago

@pc035860 We can remove UI related code from ngSelect and provide API for selecting an item. Something like

  <div ng-select-option="value">
    <span ng-click="ngToggleOption()">Select me</span>
  </div>

and in ngSelectOption directive

link: function(scope, iElm, iAttrs, ngSelectCtrl) {
  //...
  scope.ngToggleOption = function() {
    // select\unselect implementation here.
  }
}

This way we allow users to have their own UI interactions as they want.

TUNER88 commented 9 years ago

@pc035860 batch selection with Shift and Ctrl keys would be really nice Is there any progress in development of this feature?