Orderlist Delete

UI Components for Vue
Post Reply
iraklishengelia
Posts: 1
Joined: 27 Jan 2023, 16:06

18 Feb 2023, 12:27

How do you delete an item from the order list component? When deleting it from the v-model property - it deletes, but messes up the focus/selection so the component becomes unusable.

Is there some approach to avoid this?

Code: Select all

    <OrderList
        v-model="topics"
        listStyle="min-height:800px"
        class="topics-order-list"
        :stripedRows="true"
        dataKey="id"
        :moveUpButtonProps="controlButtonProps"
        :moveTopButtonProps="controlButtonProps"
        :moveDownButtonProps="controlButtonProps"
        :moveBottomButtonProps="controlButtonProps"
        @reorder="updatePositions"
    >
Deleting from topics:

Code: Select all

        deleteTopic(topicId) {
            this.topics.splice(this.topics.findIndex(t => t.id === topicId), 1)
        },

bahadirsofuoglu
Posts: 61
Joined: 06 Sep 2022, 08:59

09 Mar 2023, 12:46

Hi,
I created an example below. I could not reproduce the problem. If there is no solution, can you share an example? I would like to be of more help.

https://codesandbox.io/s/primevue-demo- ... rc/App.vue

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests