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.

[table] Provide objects as records

See original GitHub issue

I give an array of objects as records for the table, and up to version 1.0.0-beta.5 I could use the methods of these objects.

for example in template <template slot="name" scope="item"> <div @blur="saveName($event, item)" v-html="item.value" :contenteditable="true"></div> </template>

And add function to methods: savePortName: function(evt, item) { item.item.name = $(evt.target).text(); item.item.save(); },

This works fine until 1.0.0-beta.6 update, but now i get error: item.item.save() is not a function

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alexsasharegancommented, Aug 30, 2017

I can’t speak to whether or not this adjustment can be made to b-table, but there are workarounds. You could use the id of the item to search through your items array and find the object with methods available.

this.items.find( i => i.id === item.id )
0reactions
tmorehousecommented, Aug 31, 2017

Copying the table data is to prevent modifications made by b-table from affecting your original record data. Normally arrays and the contents are copied by reference, and any modification to sorting and record content would also affect your original reference to the table, hence the need to copy the data before altering it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to tables - Microsoft Support
A table has records (rows) and fields (columns). ... Tables are essential objects in a database because they hold all the information or...
Read more >
Access 2013: Introduction to Objects - GCF Global
Databases in Access are composed of four objects: tables, queries, forms, and reports. Together, these objects allow you to enter, store, analyze, ...
Read more >
5.12.2: The Four Main Objects in a Database
A table is the database object that stores data organized in an arrangement of columns and rows. Each row is a record and...
Read more >
Data Table Salesforce: 4 Comprehensive Aspects
A Data Table Salesforce, better known as the Object, has certain rows and columns whereby each row is recognized as the Record. Each...
Read more >
Objects, fields and records in salesforce - YouTube
Learn: What are Objects, fields and records in salesforce?How to create objects in salesforce?How to create a salesforce custom tab?
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