Always visible editing panel - select multiple

Always visible editing panel - select multiple

TronikTronik Posts: 122Questions: 28Answers: 1
edited October 2020 in Editor

Im using the Always visible editing panel plugin, which works great
However, it doesn't seem support multi-row edits.

How can I make that work?

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    I just made a multi-edit on that example.
    Why do you say it doesn't work?

  • TronikTronik Posts: 122Questions: 28Answers: 1

    Sorry, my mistake, it works now. Dont know why it didn't at first.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Yep, I see what you mean - you're both right. If you shift-click to select a range it works, but, if you ctl-click to select several, it doesn't. I'm not sure why that's the case, we'll take a look,

    Colin

  • TronikTronik Posts: 122Questions: 28Answers: 1

    Yes, that seems to be the case.

  • TronikTronik Posts: 122Questions: 28Answers: 1

    I cant find an "un-answered" button

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I've removed the answered flag now.

    The issue appears to be caused by a bug in the Select extension when using ctrl-click to select rows. You can see it in this example by running the following code in the console:

    $('#example').DataTable().on( 'select', function ( e, dt, type, indexes ) {
      console.log('indexes:', indexes);
    });
    

    We'll get this filed in a bug report and report back here when it is fixed.

    Allan

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited October 2020 Answer ✓

    Just thought of a workaround until we get this fixed. Instead of passing in indexes to the edit() method call, pass in dt.rows({selected:true}).indexes().

    Allan

  • TronikTronik Posts: 122Questions: 28Answers: 1

    I’ll try that!

    Many thanks

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Little update on this. I implemented the change required, but it broke our unit tests, and caused us to re-evaluate this change. We think that the indexes parameter passed it should reflect just the newly selected rows and anything else would break backwards compatibility.

    So the workaround we discussed above is actually the correct solution. I'm going to update the blog post to reflect that.

    Allan

  • TronikTronik Posts: 122Questions: 28Answers: 1

    Ok, thanks!

This discussion has been closed.