dotansimha / angularjs-dropdown-multiselect

AngularJS Dropdown Multiselect
http://dotansimha.github.io/angularjs-dropdown-multiselect/
MIT License
441 stars 455 forks source link

Disable angularjs-dropdown-multiselect based on condition check #247

Open varunprakas opened 8 years ago

varunprakas commented 8 years ago

Hello,

Is there any way to Enable and Disable angularjs-dropdown-multiselect based on condition check?

Thanks Varun

Ashviniv commented 8 years ago

@Varunprakas I think we can do it by using $scope.example12settings = {selectionLimit: 1} conditionally. If you want to disable multiselect i.e you need to enable single item selection set this property or else donot set this option to enable multiselect option.

amitchoudhary151417 commented 8 years ago

Thank for reply, But I want to make this ready only if I want to display data but not editable mode. Alternative I can do with two element one as text box & this element by ng-show based on condition. I just thinking same can be done by same element.

Ashviniv commented 8 years ago

@amitchoudhary151417 If I am not wrong, you want an option for single element to behave as both multiselect and single select which will be decided by a directive like 'ng-show. And you want multiselect on index or show page where you show your data. And single select on edit or create form?. Can you please make it clear.

pkempenaers commented 7 years ago

You can set disabled for each option which locks that option in it's current state. (That's the only way we have right now) If you still are interested in a read-only feature could you please comment? else i'm closing this issue in 2 weeks)

RasaMohamed commented 7 years ago

Hi !!!!,

I'm having more number of multiselct dropdown, I should hide a select dropdown based on the input of another one, how to achieve this and is there validation to apply dynamically.

Thanks

kasunwadasinghe commented 6 years ago

Hi.. ! You can simply use this <div isteven-multi-select input-model="inputmodel" output-model="outputmodel" button-label="Name" item-label="Name" tick-property="" disable-property="" on-item-click="OnClickChanged()" on-select-all="OnClickChanged()" on-select-none="OnClickChanged()" is-disabled="true"> </div>