Selected checkboxes disabling using angular
NickName:Rajasekhar Ask DateTime:2021-04-12T18:58:06

Selected checkboxes disabling using angular

Have datatable and checkboxes. If we select checkboxes across all pages(few records in each page), I'm able to get all JSON data of the selected records, could any one suggest me how disable the selected checkboxes. tried below code for getting json data,

  fnGetJsonData() {
    const data = this.persons.filter(f => f.checked);

    const mappedData = data.map(d => ({
      id: d.id,
      firstName: d.firstName,
      lastName: d.lastName,
      dropdown: d.dropdown
    }));
    this.persons.filter(f => f.checked); // after got json need to disable the checkboxes
    console.log(JSON.stringify(mappedData));
  }

Demo

Copyright Notice:Content Author:「Rajasekhar」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/67057169/selected-checkboxes-disabling-using-angular

More about “Selected checkboxes disabling using angular” related questions

Selected checkboxes disabling using angular

Have datatable and checkboxes. If we select checkboxes across all pages(few records in each page), I'm able to get all JSON data of the selected records, could any one suggest me how disable the se...

Show Detail

Angular Get Selected CheckBoxes

I have a list of dynamically filled checkboxes using angular. <div ng-repeat="X in XList"> <label>{{X.Header}}</label> <input type="checkbox" name="X&qu

Show Detail

Select all if all checkboxes are selected, angular js

On my page I have angular ui accordion, inside of each panel, I'm rendering list with items and checkboxes, also I have checkbox "select all". For selection method and logic I used this resource. In

Show Detail

Whole row of checkboxes being selected

I am using the example for Mat table to add another column with checkboxes. how ever when I click one column the other columns checkboxes also get selected. How do I correctly implement it so that ...

Show Detail

Get all selected checkboxes and their associated attributes using angular

I need to be bundle selected checkboxes together to POST to my server. In each checkbox's attributes, I'm storing some two important values: "pos" (part of speech), and definition. I need to run th...

Show Detail

Angular checkboxes error

I have a little problem with checkboxes : I have an array of objet. I do a ng-repeat on this array and i associate checkboxes on each element. <li ng-repeat="title in treeZone track by $index...

Show Detail

Checking if the checkboxes are selected or not

I am using this function to check the multiple number of checkboxes: def checkMultipleCheckoxes(self, values): for i in values: checkboxes = self.driver.find_elements_by_xpath(...

Show Detail

Angular.js Checkboxes

I'm trying to do something very simple with checkboxes and Angular 1.x. I want to pre-select some checkboxes on an edit page and then after some selections are made to save the data to a backend. ...

Show Detail

Issues with Angular FormArrays: Valuechanges, Validators and deselecting Checkboxes

I have Angular formArray of checkboxes. I also have a validator that makes sure at least one of the checkboxes is selected. My problems are: When the last checkbox is selected, I want to deselec...

Show Detail

AngularJs Checkbox that will toggle selected on all other checkboxes

I am using AngularJs (Angular 1) and I need to use a checkbox to Select / Unselect all other checkboxes. Right now I have this: <li ng-repeat="item in ctrl.items"> <input type="checkb...

Show Detail