|
|
@@ -2118,7 +2118,7 @@ class TableAjax extends ViewAjax {
|
|
|
}).then(function (response) {
|
|
|
return response.json()
|
|
|
}).then(function (data) {
|
|
|
- if (priv.options.debug) console.log('loadDataAjax:fetch:update: request finished data:', data);
|
|
|
+ if (priv.options.debug) console.log('loadDataAjax:fetch:update: request finished response data:', data);
|
|
|
if ('success' == data.type) {
|
|
|
// p5UI__notifyAjaxCallback(data);
|
|
|
return data;
|
|
|
@@ -2129,6 +2129,7 @@ class TableAjax extends ViewAjax {
|
|
|
}
|
|
|
return null;
|
|
|
}).then(function (data) {
|
|
|
+ if (priv.options.debug) console.log('loadDataAjax:fetch:update: request finished data:', data);
|
|
|
if (!data) return;
|
|
|
if (data && data.cols) {
|
|
|
priv.setStateCols(data.cols, data.primaryKey);
|
|
|
@@ -2221,8 +2222,9 @@ class TableAjax extends ViewAjax {
|
|
|
};
|
|
|
|
|
|
priv.setStateCols = function(cols, primaryKey) {
|
|
|
+ if (priv.options.debug) console.log('priv.setStateCols: ', {primaryKey: primaryKey, cols: cols});
|
|
|
_state.cols = cols;
|
|
|
- _state.primaryKey = primaryKey;
|
|
|
+ _state.primaryKey = primaryKey || _state.primaryKey;
|
|
|
// fix col name - props.column
|
|
|
$.each(_state.cols, function(col, props) {
|
|
|
props.column = col;
|