ВОПРОС : Я не понимаю, почему параметр 'contentType' не может быть найден.У меня правильно написано.Я предполагаю, что я не устанавливаю параметры правильно.Информация в ссылке поддержки не помогла.Я предполагаю, что я не ссылаюсь на объект правильно.
Есть идеи?
ОШИБКА : Предупреждение DataTables: table id = attachment - Требуется неизвестный параметр 'contentType'для строки 0, столбца 0. Для получения дополнительной информации об этой ошибке см. http://datatables.net/tn/4
JSON :
[{
"_data$p$0": {
"id": "AAMkADU4MzkxN2RmLTdiZS53ao=",
"name": "somefile.xlsx",
"contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": 43069,
"attachmentType": 0,
"isInline": false
}}]
JAVASCRIPT :
Office.initialize = function (reason) {
$(document).ready(function () {
app.initialize();
window.alert = function (message) { app.showNotification("DataTable", message); };
var attachments = localStorage.getItem("Attachments");
console.log(attachments);
// Display Table
$('#attachment').DataTable({
data: attachments,
columns: [
{ data: 'contentType' },
{ data: 'name' }
]
});
});};
HTML :
<table id="attachment" class="display">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
</tr>
</thead>