@fimarapp
@fimarapp
Forum Replies Created
-
AuthorPosts
-
fimarappMember
Thank you so much Peter for your answer, really helpful and clear.
Enjoy the rest of your day!
Johnny
PS: Also, I just noticed thatremoveAt
is part of the Array methods in JavaScript (I feel silly)…dataSource
is an Array
fimarappMemberThank you so much, really helpful Yavor ^^ you are the best one, enjoy the rest of your day!
fimarappMemberThat solution is awesome Yavor, I didn’t know I have to copy the array and coudn’t find the removeAt method in the docs : (
Even it fits perfectly when the rowIndex is different from the row-id (what I’m looking for). My last question and I promise I don’t bother you anymore. How can I set my database id in each row-id.
[
{id: 234, name: ‘Alice’, color: ‘yellow’},
{id: 67, name: ‘Bob’, color: ‘white’},
]
I’m trying to do it with dataRowId. I want to remove it from my database as well using the real db id without painting that in an extra column.
Any idea will be so appreciated!
And thank u again for your great help and your fast responses if you are in https://opencollective.com/ I will be more than happy that make a donation, you save me hours of my time
JohnnyfimarappMemberThank you so much Yavor, that was really helpful ^^
but the problem is that if I check “select all” and then click on “Delete” I get an error ->Uncaught Error: Invalid Item Index
[x] | Name | Color | Pixels | Status |
[x] | Alice | Yellow | 324233 | On |
[x] | Bob | White | 111111 | Off |
…
[Delete] [Add]
function del() {
table.getSelection().forEach(row=> {
if (table.dataSource.length > 0) table.dataSource.removeAt(row)
})
table.selected = []
}
Thank u so much for your time in advance
Yavor DashevfimarappMemberThank you so much Yavor, it works like a charm with Svelte! One of the best web components collection out there!
I’m using: bind:this={table}
Best regards and enjoy the weekend !! -
AuthorPosts