Reputation: 47
I am having an array of objects like this. I need to send an API request to the database to change their display order. How can I pass order_position
into the body of an API request? I intend to send an API request after clicking the confirm button. Should I send an API request every time the up and down arrows are pressed? Please help me, this problem is really hard for me
getFolders() {
let data: any[] = [
{
id: 100,
name: '店舗',
order_position: 1
},
{
id: 101,
name: '東日本統括部',
order_position: 2
},
{
id: 102,
name: '東日本統',
order_position: 3
}
]
this.list_folders = data
}
Upvotes: 0
Views: 196
Reputation: 176
if you would like to use vue-draggable, probably you can try this way
Upvotes: 1