I have a table displaying a list of items, and I want to highlight any new item added to the collection for 1 second to draw the user's attention. How can I modify the background color of the newly added object in a .vue file?
Below is the code snippet used to add a new object:
var newItem = this.tableItems.find(item => item.id === itemId);
var itemIndex = this.tableItems.findIndex(item => item.id == itemId);
this.tableItems.splice(itemIndex, 1); // remove item from items collection
this.tableData.unshift(newItem); // add item to table-data