Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

when selecting second dropdown ng-model object return null

<select ng-options="option.name for option in $ctrl.getAvailableColumnOptions('secondColumnOption')" ng-model="$ctrl.secondColumnOption"></select>
<select ng-options="option.name for option in $ctrl.getAvailableColumnOptions('thirdColumnOption')" ng-model="$ctrl.thirdColumnOption"> </select>


getAvailableColumnOptions(ignoreOption) {
  return this.allAvailableColumnOptions
    .filter(x => (ignoreOption === 'secondColumnOption' || x.name !== this.secondColumnOption.name)
      && (ignoreOption === 'thirdColumnOption' || x.name !== this.thirdColumnOption.name)
      && (ignoreOption === 'fourthColumnOption' || x.name !== this.fourthColumnOption.name)
    );
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: inserting new value to an array of object in typescript 
Javascript :: AngularJS slick carousel filter by attribute 
Javascript :: I am getting an error "createSpyObj requires a non-empty array" with running unit tests, which were executed perfectly before 
Javascript :: EXPO useEffect not called on navigating to same screen 
Javascript :: Edit parameter in variable with increment/decrement box and save it 
Javascript :: check if Popups and Redirects are allowed 
Javascript :: .push( ) is not updating the variable 
Javascript :: Add and remove required attribute based on whether it is visible or hidden 
Javascript :: chain underscore 
Javascript :: track call recording in facebook using elements 
Javascript :: flatten a nested json 
Javascript :: style dropdown react native picker 
Javascript :: TypeError: table.fnFilter is not a function 
Javascript :: Third Example of Event Delegation In JavaScript 
Javascript :: nodejs passport starter template with username and password 
Javascript :: Importing Ky Module In JavaScript 
Javascript :: phaser rotate matrix 180 
Javascript :: how to install ghost js 
Javascript :: chrome page transitions 
Javascript :: react sate and props 
Javascript :: kendo grid set page number 
Javascript :: checkbox null value javascript 
Javascript :: Hardhat deploy sample js code 
Javascript :: function titleCase 
Javascript :: component rerendering when view port comes 
Javascript :: sinha express crud template 
Javascript :: jquery issue stack 
Javascript :: Wrong Model Name For Backbone: Code Still Runs 
Javascript :: get selected data items kendo grid 
Javascript :: convert 12 hour to 24 hour javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =