Tabulator leaves the changes made after Tabulator loading












0















I am using "tabulator-tables" "version:4.0.4".



A translate function is called on a front end to translate some the visible data of the tabulator table after the tabulator is loaded on the screen with the data. Everything worked as expected.



The issue is when resizing the browser screen or open window inspect element, tabulator leaves the changes made after tabulator loading(like translate function) and show the raw data which we received from the back end.



help required: how to save the changes which don't leave its effect on browser resizing or on opening inspect element.



Refer the screenshot for reference:





CODE:



async function columnTab(searchData = "", lmt) {
searchData = searchData ? searchData : await fetchReqUrl("search", `?limit=${lmt}`, "fetch", "POST", "viewform");
searchData = (JSON.parse(searchData)); //data fetched from back end
let DataCollHead = searchData.columns
let slNo = [{ title: "Sl No.", formatter: "rownum", align: "center", width: 80 }]
DataCollHead = slNo.concat(DataCollHead)
let DataCollList = searchData.tableData
table = new Tabulator("#searchContainer", {
// movableRows:true,
columns: DataCollHead,
layout: "fitColumns",
pagination: "local",
paginationSize: 20,
clipboard: true,
clipboardPasteAction: "replace",
clipboard:true,
clipboardPasteAction:"replace",
responsiveLayout: "collapse" ,

})
var tableData = DataCollList;
table.setData(tableData);

let resultRow = dgei('searchContainer') //function to translate the data
resultObj()
formatResult(resultRow);
}









share|improve this question

























  • Please edit your question to include the relevant parts of your code, we won't be able to help otherwise. Please read How to Ask

    – Patrick Hund
    Nov 24 '18 at 9:21











  • We will need to see the code you are using to fully diagnose it, but from your description it looks like you are trying to manipulate the contents of your table from outside of Tabulator. Because Tabulator uses a virtual DOM any changes you try to make from outside the table will be replaced whenever the table is redrawn, on resize for example. you should be using the inbuilt formatters to alter the table structure. if you post the translate functions you are using and a description of what you want to achieve, i can show you how to integrate them into a formatter

    – Oli Folkerd
    Nov 24 '18 at 10:46
















0















I am using "tabulator-tables" "version:4.0.4".



A translate function is called on a front end to translate some the visible data of the tabulator table after the tabulator is loaded on the screen with the data. Everything worked as expected.



The issue is when resizing the browser screen or open window inspect element, tabulator leaves the changes made after tabulator loading(like translate function) and show the raw data which we received from the back end.



help required: how to save the changes which don't leave its effect on browser resizing or on opening inspect element.



Refer the screenshot for reference:





CODE:



async function columnTab(searchData = "", lmt) {
searchData = searchData ? searchData : await fetchReqUrl("search", `?limit=${lmt}`, "fetch", "POST", "viewform");
searchData = (JSON.parse(searchData)); //data fetched from back end
let DataCollHead = searchData.columns
let slNo = [{ title: "Sl No.", formatter: "rownum", align: "center", width: 80 }]
DataCollHead = slNo.concat(DataCollHead)
let DataCollList = searchData.tableData
table = new Tabulator("#searchContainer", {
// movableRows:true,
columns: DataCollHead,
layout: "fitColumns",
pagination: "local",
paginationSize: 20,
clipboard: true,
clipboardPasteAction: "replace",
clipboard:true,
clipboardPasteAction:"replace",
responsiveLayout: "collapse" ,

})
var tableData = DataCollList;
table.setData(tableData);

let resultRow = dgei('searchContainer') //function to translate the data
resultObj()
formatResult(resultRow);
}









share|improve this question

























  • Please edit your question to include the relevant parts of your code, we won't be able to help otherwise. Please read How to Ask

    – Patrick Hund
    Nov 24 '18 at 9:21











  • We will need to see the code you are using to fully diagnose it, but from your description it looks like you are trying to manipulate the contents of your table from outside of Tabulator. Because Tabulator uses a virtual DOM any changes you try to make from outside the table will be replaced whenever the table is redrawn, on resize for example. you should be using the inbuilt formatters to alter the table structure. if you post the translate functions you are using and a description of what you want to achieve, i can show you how to integrate them into a formatter

    – Oli Folkerd
    Nov 24 '18 at 10:46














0












0








0








I am using "tabulator-tables" "version:4.0.4".



A translate function is called on a front end to translate some the visible data of the tabulator table after the tabulator is loaded on the screen with the data. Everything worked as expected.



The issue is when resizing the browser screen or open window inspect element, tabulator leaves the changes made after tabulator loading(like translate function) and show the raw data which we received from the back end.



help required: how to save the changes which don't leave its effect on browser resizing or on opening inspect element.



Refer the screenshot for reference:





CODE:



async function columnTab(searchData = "", lmt) {
searchData = searchData ? searchData : await fetchReqUrl("search", `?limit=${lmt}`, "fetch", "POST", "viewform");
searchData = (JSON.parse(searchData)); //data fetched from back end
let DataCollHead = searchData.columns
let slNo = [{ title: "Sl No.", formatter: "rownum", align: "center", width: 80 }]
DataCollHead = slNo.concat(DataCollHead)
let DataCollList = searchData.tableData
table = new Tabulator("#searchContainer", {
// movableRows:true,
columns: DataCollHead,
layout: "fitColumns",
pagination: "local",
paginationSize: 20,
clipboard: true,
clipboardPasteAction: "replace",
clipboard:true,
clipboardPasteAction:"replace",
responsiveLayout: "collapse" ,

})
var tableData = DataCollList;
table.setData(tableData);

let resultRow = dgei('searchContainer') //function to translate the data
resultObj()
formatResult(resultRow);
}









share|improve this question
















I am using "tabulator-tables" "version:4.0.4".



A translate function is called on a front end to translate some the visible data of the tabulator table after the tabulator is loaded on the screen with the data. Everything worked as expected.



The issue is when resizing the browser screen or open window inspect element, tabulator leaves the changes made after tabulator loading(like translate function) and show the raw data which we received from the back end.



help required: how to save the changes which don't leave its effect on browser resizing or on opening inspect element.



Refer the screenshot for reference:





CODE:



async function columnTab(searchData = "", lmt) {
searchData = searchData ? searchData : await fetchReqUrl("search", `?limit=${lmt}`, "fetch", "POST", "viewform");
searchData = (JSON.parse(searchData)); //data fetched from back end
let DataCollHead = searchData.columns
let slNo = [{ title: "Sl No.", formatter: "rownum", align: "center", width: 80 }]
DataCollHead = slNo.concat(DataCollHead)
let DataCollList = searchData.tableData
table = new Tabulator("#searchContainer", {
// movableRows:true,
columns: DataCollHead,
layout: "fitColumns",
pagination: "local",
paginationSize: 20,
clipboard: true,
clipboardPasteAction: "replace",
clipboard:true,
clipboardPasteAction:"replace",
responsiveLayout: "collapse" ,

})
var tableData = DataCollList;
table.setData(tableData);

let resultRow = dgei('searchContainer') //function to translate the data
resultObj()
formatResult(resultRow);
}






javascript tabulator






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 13:32









Brian Tompsett - 汤莱恩

4,2331338101




4,2331338101










asked Nov 24 '18 at 8:48









Ritesh kumarRitesh kumar

12




12













  • Please edit your question to include the relevant parts of your code, we won't be able to help otherwise. Please read How to Ask

    – Patrick Hund
    Nov 24 '18 at 9:21











  • We will need to see the code you are using to fully diagnose it, but from your description it looks like you are trying to manipulate the contents of your table from outside of Tabulator. Because Tabulator uses a virtual DOM any changes you try to make from outside the table will be replaced whenever the table is redrawn, on resize for example. you should be using the inbuilt formatters to alter the table structure. if you post the translate functions you are using and a description of what you want to achieve, i can show you how to integrate them into a formatter

    – Oli Folkerd
    Nov 24 '18 at 10:46



















  • Please edit your question to include the relevant parts of your code, we won't be able to help otherwise. Please read How to Ask

    – Patrick Hund
    Nov 24 '18 at 9:21











  • We will need to see the code you are using to fully diagnose it, but from your description it looks like you are trying to manipulate the contents of your table from outside of Tabulator. Because Tabulator uses a virtual DOM any changes you try to make from outside the table will be replaced whenever the table is redrawn, on resize for example. you should be using the inbuilt formatters to alter the table structure. if you post the translate functions you are using and a description of what you want to achieve, i can show you how to integrate them into a formatter

    – Oli Folkerd
    Nov 24 '18 at 10:46

















Please edit your question to include the relevant parts of your code, we won't be able to help otherwise. Please read How to Ask

– Patrick Hund
Nov 24 '18 at 9:21





Please edit your question to include the relevant parts of your code, we won't be able to help otherwise. Please read How to Ask

– Patrick Hund
Nov 24 '18 at 9:21













We will need to see the code you are using to fully diagnose it, but from your description it looks like you are trying to manipulate the contents of your table from outside of Tabulator. Because Tabulator uses a virtual DOM any changes you try to make from outside the table will be replaced whenever the table is redrawn, on resize for example. you should be using the inbuilt formatters to alter the table structure. if you post the translate functions you are using and a description of what you want to achieve, i can show you how to integrate them into a formatter

– Oli Folkerd
Nov 24 '18 at 10:46





We will need to see the code you are using to fully diagnose it, but from your description it looks like you are trying to manipulate the contents of your table from outside of Tabulator. Because Tabulator uses a virtual DOM any changes you try to make from outside the table will be replaced whenever the table is redrawn, on resize for example. you should be using the inbuilt formatters to alter the table structure. if you post the translate functions you are using and a description of what you want to achieve, i can show you how to integrate them into a formatter

– Oli Folkerd
Nov 24 '18 at 10:46












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53456605%2ftabulator-leaves-the-changes-made-after-tabulator-loading%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53456605%2ftabulator-leaves-the-changes-made-after-tabulator-loading%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Create new schema in PostgreSQL using DBeaver

Deepest pit of an array with Javascript: test on Codility

Fotorealismo