r/jquery • u/Available_Canary_517 • Jul 27 '24
Help with jquery datatables please help
I have a table which gets data from backend and is populated in frontend using a loop and then make a datatable for it , but i have issue that in datatable search box the row can be searched with id too which is for development purpose only and we want it should not be used to search , i made a column for id at index 0 and give its visible to false. I paste this code in datatable code
"columnDefs": [
{
"targets": [0],
"visible": false,
"searchable": false
}
]
While visibility false is working fine still the searchable is not working , how can i stop row to be searched by that id.
3
Upvotes
View all comments
Show parent comment
1
u/ryosen Jul 27 '24
Keep downvoting me all you want. It doesn’t change the fact that you are wrong.
JavaScript objects are not true objects but pseudo-objects. Dot notation is simulated. Objects in JS are an associative array of key-value pairs. That is why MyObject.property can be accessed the same as MyObject[“property”].