question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

General questions about Example #2

See original GitHub issue

Example #2 deals with the use of object-based datatable rows in memory. I have a couple of questions about this example that I was unable to answer myself:

  • Does adding, editing and deleting rows from the dataSet variable also update this variable?
  • When adding and editing the console.log shows the new object. Can this be disabled?
  • Similar to the situation above, the console.log writes a message, e.g., Missing AJAX configuration for INSERT. Does this mean we have to provide a function for INSERT, DELETE and UPDATE to update the dataSet variable?

Some background information on how I would like to use the editor. I got a dataset in a variable that I use to plot using a JS plotting library. I want to use this dataset into datatables in combination with the alt-editor. Since the dataset is in memory, I need the editor to update the contents of the variable dataset on all actions.

I figure that I can use the AJAX configuration also for the redrawing of the chart after an INSERT, DELETE or UPDATE action. But before that I need to know if the variable is updated by the plugin or I have to write code to do this myself.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
luca-vercellicommented, Jul 26, 2020

Hello @schonhose . I’ll try to answer everything.

* Does adding, editing and deleting rows from the `dataSet` variable also update this variable?

Not sure of this, I think not. That variable is used only for initialization, it is not linked to the Datatable, AFAIK. Don’t rely on this.

When adding and editing the console.log shows the new object. Can this be disabled?

No it can’t. It’s some debug code that I forgot somewhere in the code. You can safely find and remove every “console.log” line in the script.

Similar to the situation above, the console.log writes a message, e.g., Missing AJAX configuration for INSERT. Does this mean we have to provide a function for INSERT, DELETE and UPDATE to update the dataSet variable?

Not exactly. You have to provide these functions (callbacks) if you want to update you backed - whatever it is. Usually you want call some a server, via AJAX (example n. 3). In your case, you can use these callbacks to update dataSet variable…

0reactions
schonhosecommented, Sep 17, 2020

This can be closed as far as I am concerned.

Read more comments on GitHub >

github_iconTop Results From Across the Web

35+ Interview Questions and Answers [Full List] - Novoresume
What do you love about your job? What are your top 2-3 achievements that are relevant to the job you're applying for? Now,...
Read more >
30 Top Interview Questions To Prepare For (With Answers)
Get tips and read through example answers for 30 top job interview questions, plus review 96 more common questions, to prepare answers for ......
Read more >
The Top 30 Behavioral Interview Questions to Prep For
Customer service questions · Describe a time when it was especially important to make a good impression on a client. · Give me...
Read more >
Common Interview Questions | CareerOneStop
Give an example of how you solved a problem in the past. What are your strengths? How do others describe you? What do...
Read more >
over 70 survey question examples + types of surveys and FAQs
2. Closed-ended survey questions. Closed-end questions limit a user's response options to a set of pre-selected choices. This broad category of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found