What is the best way to fetch an id and pass it as a parameter

I am using Vuetify for my project.

<v-col cols="12" md="8">
<v-select :items="driverName" v-bind:id="editedItem.driverId" v-model="editedItem.score" label="score"></v-select>
</v-col>

Currently, I need to capture the result ID v-bind:id="editedItem.driverId" in the :items.

<v-data-table
    :headers="headers"
    :items="desserts"
    sort-by="calories"
    class="elevation-1"
  >

I fetch data using an API with Axios. You can find the code here.

Answer №1

<v-col cols="12" md="8">
     
     <v-select :items="drivers" item-value="_id"  item-text="lastname"  v-model="editedItem.score" label="Счёт">
     </v-select>
</v-col>
     

console.log(this.editedItem.score);
// displaying edited score

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Failure to prompt for authentication when accessing secure URLs via the $.ajax function

Whenever I work remotely, accessing URLs for our development servers always requires basic authentication. This means that every time a web page includes a script or link tag pointing to our development server, we encounter an authentication prompt. Recen ...

Tips for keeping a div fixed at the bottom of the page when scrolling after a checkbox has been selected

Typically, I don't ask questions until I've exhausted all other solutions...but here we are. Despite my efforts in searching, I have not found any similar questions to mine. So, my question is: How can I make a div at the bottom of the page sti ...

Initializing Three.js to load the model

I have a 3D model that I initially had in the 3DS format. I then converted it to OBJ and finally to JS format. Now, my goal is to load this model into another JS file. Below you'll find the code snippet I've written for this purpose: var loader ...

Contrasting $(document).ready and directly writing jQuery statements at the beginning of a script

What distinguishes coding with and without $(document).ready? Consider the following: $(document).ready(function() { $("#button").click(function() { //Code }); }); Versus: $("#button").click(function() { //Code }); Also : <inp ...

During the build process, the parameters in Next.js are not accessible

I am currently using Next.js 13 with the experimental app directory. My application utilizes dynamic routing in the following format: https://app.domain/[itemid]/[slug] Within my [slug] directory, if I create a server-side route file pages.jsx with th ...

Can you explain the variance between calling mongoose.Schema() and creating a new instance with new mongoose.Schema()?

Can you explain the distinction between mongoose.Schema() and new mongoose.Schema() methods? I have tried both approaches, and it seems like they yield similar results. Are there any notable differences or implications to consider? ...

AmplifyJS is throwing an error: TypeError - It seems like the property 'state' is undefined and cannot be read

I am currently working on integrating the steps outlined in the Amplify walkthrough with an Angular cli application. My app is a brand new Angular cli project following the mentioned guide. My objective is to utilize the standalone auth components a ...

Wizard for the advanced tab panel

I am facing a challenge with my advanced TabPanel Wizard. It consists of 4 tabs, each serving as its own form to allow for validation within the tab itself. The issue I am encountering is related to the validation behavior of non-rendered tabs. One proble ...

Error message: React Native encountered a prop type failure when an invalid prop of type array was passed to the Overlay component

I am brand new to React Native and encountering an error message when opening a specific component. Although it doesn't hinder navigation, I would like to resolve this issue. I suspect it could be related to a syntax or typo error, but pinpointing the ...

What steps can be taken to prevent the uploading of executable files in Alfresco Share?

Is there a way to prevent users from uploading executable files such as .exe and .msi files directly into Alfresco Share? I am looking for a solution that will restrict the upload of executable files in Alfresco Share right at the moment of upload, rather ...

Error in the Json object - three.js

After creating a .3ds object in 3DS Max, I exported it as .obj and then converted it to .js using the command python convert_obj_three.py -i mesh.obj -o mesh.js However, there seems to be an issue with the mesh.js file, as I am receiving an error message ...

Adjusting the form action dynamically based on session variable: A step-by-step guide

In the scenario where I have a form and the action needs to vary based on a session variable, how can I dynamically change the action so that when a specific link button is clicked by the client, the form can be submitted with the correct action? <fo ...

Tips for updating the DOM within a map function by utilizing the onChange event with a checkbox and react hooks

Initially, I imported a basic "database" object from another file that contains an array of students. I then used map to iterate through the student array and display all the students on the window object. Everything was working fine until I attempted to ...

Unable to access property 'scrollToBottom' as it is undefined

I'm encountering the error "Cannot read property 'scrollToBottom' of undefined" and haven't been able to find a solution anywhere, hence this post: Here is my use case: I have a custom accordion list, and on click of one of the list i ...

Is there a way to deliver information to a specific element on a client's HTML page?

My current project involves using Node.js to serve a webpage that collects user inputs and stores them in a mongodb server. The web page also displays these user inputs. I am trying to determine the best way to pass the user inputs from node.js to the < ...

Preventing the descent into callback chaos in NodeJS

I've come across this function: /* GET main page */ router.get('/', (req, res, next) => { Account.find({accType: 'Employer'}, (err, col) => { if (err) { console.log(err); } else { ...

Is it possible for me to access information from an external URL using JSON?

As I delve into learning about JSON for app development, I've encountered an issue with a JSON and PHP-based chat system. While the code functions properly for the same origin policy, when it comes to sending and receiving data from an external URL, i ...

The method option of a Vuex 2.0 component does not function as expected when attempting to mix mapActions with locally defined

When implementing my app using Vue.js 2.0 and Vuex 2.0, I often encounter the need to import methods defined in actions within component definitions. Additionally, I sometimes want to declare local functions along with importing these actions. Here is an e ...

Achieving a multiline ellipsis (clamp) across various levels of HTML tags, compatible with popular browsers like IE and Firefox

After conducting extensive research, I finally discovered a reliable method for implementing multiple Line Ellipsis (using JS, as plain CSS is not effective). Despite exploring 100 different Google results and Q/As, this is currently the only solution that ...

The collada loader in three.js assigns the UV texture's color to every model in the scene

Apologies for my poor English skills. I am encountering an issue with the Collada loader in Three.js. In Blender, I have a cylinder with a UV texture applied to it, and when I render it everything looks fine. However, upon exporting and loading it into Thr ...