Sampath
Sampath

Reputation: 65870

xeditable drop down's selected value is not working properly

I'm using xeditable module.So my question is how can I get the drop down's change value ? At this moment it's not working.Please check the below plunk.Thanks in advance.

 <div ng-controller="Ctrl" style="margin: 50px">
      <a href="#" editable-select="user.status" e-ng-options="s.value as s.text for s in statuses" e-ng-change="myAlert(user.status)">
        {{ showStatus() }}
      </a>
      <br><br>
      debug: {{ user | json }}
    </div>

Plunker

EDIT

I need to hide the left hand text box (Name's column) according to the value of drop down (when user selects it).Could you tell me how to do that ?

JSFiddle

EDIT 2 :

enter image description here

Upvotes: 2

Views: 731

Answers (1)

KreepN
KreepN

Reputation: 8598

Here's a quick example forked from your fiddle, change the dropdown to 1:

http://jsfiddle.net/crv2vst5/

$scope.Selected = 0;
$scope.Hidden = false;

$scope.HideNameColumn = function(val) {

    if(parseInt(val) == 1){        
        $scope.Hidden = true; 
    }
    else{             
        $scope.Hidden = false;
    }       
}      

EDIT:

Done : http://jsfiddle.net/Lw7h956h/

Final :

JsFiddle

Upvotes: 1

Related Questions