cscan / vue3-excel-editor

Vue3 plugin for displaying and editing the array-of-object in Excel style.
MIT License
231 stars 51 forks source link

Grid is not refreshing when rows are deleted. #37

Closed seagulledge closed 5 months ago

seagulledge commented 6 months ago

I am using Vue3 composition API, and I made a button handler to delete selected records. The action partially works. The record(s) are removed from the data model, the 'delete' event is called, and exporting the data afterwards does not include the deleted rows.

However: the rows are NOT visually removed from the table. They still appear, and can be selected and edited. No changes are tracked on those edits, and the records can't be deleted again. Tested with just deleteRecord() and had the same problem.

   const grid = ref<any>(null)

   const DeleteRecord = () => {
        grid.value.deleteSelectedRecords()
    }
cscan commented 6 months ago

You may need to declare the variable in data region in Vue

On Wed, 1 Nov 2023, 5:27 AM R. Gulledge, @.***> wrote:

I am using Vue3 composition API, and I made a button handler to delete selected records. The action partially works. The record(s) are removed from the data model, the 'delete' event is called, and exporting the data afterwards does not include the deleted rows.

However: the rows are NOT visually removed from the table. They still appear, and can be selected and edited. No changes are tracked on those edits, and the records can't be deleted again. Tested with just deleteRecord() and had the same problem. ` const grid = ref(null)

const DeleteRecord = () => { grid.value.deleteSelectedRecords() } `

— Reply to this email directly, view it on GitHub https://github.com/cscan/vue3-excel-editor/issues/37, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYSOF43ZXC5LJFZWEOOCDLYCFUKPAVCNFSM6AAAAAA6YLRULCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TCMZSG43DENI . You are receiving this because you are subscribed to this thread.Message ID: @.***>