Skip to content

Commit

Permalink
Fixed error about the onclick row and on click all
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Sanchez authored and Victor Sanchez committed Nov 28, 2020
1 parent 835d1a6 commit 5f7baaf
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions MultiselectRecordsEntity/MultiselectRecords.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ const getRecordsFromTextField = async () => {
let selectedItemsCopy: any = selectedItems;
if(row.classList.contains("is-selected")) {
row.classList.remove("is-selected");
console.log(item[props.attributeid] + " - " + selectedItemsCopy + " - " + selectedItems);

selectedItemsCopy = selectedItems.filter( (x:any) => x[props.attributeid] != item[props.attributeid])
} else {
row.classList.add("is-selected");
Expand All @@ -164,7 +162,6 @@ const getRecordsFromTextField = async () => {
if(selectedItemsCopy.length > 0) {
selectedItemsCopy = selectedItemsCopy.filter((a: any, b: any) => selectedItemsCopy.indexOf(a) === b)
}
console.log(selectedItemsCopy);
setSelectedItems(selectedItemsCopy);
}

Expand Down

0 comments on commit 5f7baaf

Please sign in to comment.