Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primevue 2.4.x Datatable inline edit not working with filter #1359

Closed
zsuzsmuzs opened this issue Jun 24, 2021 · 1 comment
Closed

Primevue 2.4.x Datatable inline edit not working with filter #1359

zsuzsmuzs opened this issue Jun 24, 2021 · 1 comment

Comments

@zsuzsmuzs
Copy link

I'm submitting a ...

[X ] bug report 

CodeSandbox Case (Bug Reports)
https://codesandbox.io/s/hungry-brattain-h5ejs

Current behavior
If you use a filter with the datatable the inline edit is not working

Expected behavior
Inline edit should work with filter as well

Minimal reproduction of the problem with instructions
Filter category for accessoires. Try to edit last row --> Edit won't work.

The problem is, that props.index is used here. But when we filter the order of the rows is changed. I tried to work with the ids instead of the index,.

My aproach:

onCellEditComplete(event){
   const id = event.data.id,
   editingCellValue = this.editingCellRows[id][event.field];
   index = this.products.findIndex(item => item.id === id);
   Vue.set(this.products, index, this.editingCellRows[id];
}

and something similar to onCellEdit but it still is buggy this way. I could not make it work and had to go back to row editing.

  • Vue version: 2.X

  • PrimeVue version: 2.4.X

  • Browser: all

@cagataycivici
Copy link
Member

#1273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants