S
S
SPART4K632021-06-11 09:56:06
JavaScript
SPART4K63, 2021-06-11 09:56:06

How to add class to DataTables cell?

I have a JSON like this

{
  "id": "1000027",
  "device_id": "9007015",
  "order_id": null,
  "date_create": "2021-05-14 16:12:52",
  "customer_fio": "ТЕСТ ЭКРАНА",
  "customer_phone": "+7 (927) 714-69-95",
  "summ_with_discount_vitrina": "248.00",
  "order_status": "Подтвержден",
  "order_count": "71"
}


Here is my DataTables config

{ "data": "order_status",
      "className":  ("order_status" == "Подтвержден") ? "active" : "nonactive" 	
}


Tell me what's the problem? Only the "nonactive" class is added

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question