@fimarapp

@fimarapp

Forum Replies Created

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • in reply to: Full Documented API #101425
    fimarapp
    Member

    Thank you so much Peter for your answer, really helpful and clear.
    Enjoy the rest of your day!
    Johnny
     
    PS: Also, I just noticed that removeAt is part of the Array methods in JavaScript (I feel silly)… dataSource is an Array
     

    in reply to: Remove table rows #101351
    fimarapp
    Member

    Thank you so much, really helpful Yavor ^^ you are the best one, enjoy the rest of your day!

    in reply to: Remove table rows #101345
    fimarapp
    Member

    That 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
    Johnny

    in reply to: Remove table rows #101336
    fimarapp
    Member

    Thank 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 Dashev

    in reply to: Update only Table columns (th) #101328
    fimarapp
    Member

    Thank 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 !!

Viewing 5 posts - 16 through 20 (of 20 total)