inline edit fails in compact responsive mode because of

inline edit fails in compact responsive mode because of

javismilesjavismiles Posts: 205Questions: 38Answers: 3

im using a class to identify which of my cells are editable

$('#'+obj.table).on( 'click', 'tbody td:not(.child), tbody span.dtr-data', function (e) {
    if ( $(this).hasClass( 'control' ) || $(this).hasClass('select-checkbox') ) {return;}

        iseditable=$(this).hasClass('easyEdit');            
        where=e.delegateTarget.id;

        if (iseditable){

            if( $(this).hasClass( "dtr-data" )){
                eArray[indextmp].inline( this , {onBlur: 'submit'});
            }
            else {
                eArray[indextmp].inline( thetable.cell(this).index(), {onBlur: 'submit'});
            }


        }

this works great in normal mode

but in compact responsive mode,
I dont know why but you are not applying the same classes or they cannot be found,
they are also not highlighted, it should behave in the same exact way, this is not good UX in my view

where can I find this iseditable=$(this).hasClass('easyEdit');
when in compact responsive mode?

and likewise for

"createdRow": function ( row, data, index ) {
if ( data.worksol.imp=="1") {
$('td', row).eq(8).addClass('easyEditHighlight');
}
},

this again works great in normal mode but not in compact responsive mode,

it doesnt make sense that in normal mode people can see with colors which cells are editable and then
in compact responsive mode they cannot see it because the whole thing works differently

This question has an accepted answers - jump to answer

Answers

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    so the very same cell in normal mode looks like:

    <td class=" easyEdit" style="">777.00€</td>

    and in compact responsive mode looks like:

    <span class="dtr-data">777.00€</span>

    so what is the point of this??
    { className: "easyEdit", "targets": [ 15,16,17 ] },

    this is absolutely dismal UX behaviour,
    please this needs to be fixed, you cannot have completely different behaviours in responsive vs normal mode, where you literally strip away and take out things that are added through your own API (e.g: the className above)

    this is just 1 example, the whole responsive-compact mode is full of these

    thank u

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    I really would love not to have to go through something like this:
    if( $(this).hasClass( "dtr-data" )){
    try {
    val=e.target.previousElementSibling.innerHTML;
    to find out where I am clicking,

    please lets make the behaviour consistent, if not there is really no point in styling and detecting which cells are inline editable

    thank u

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    I love datatables, its the best, and if you can help me with these responsive mode issues it will be wonderful, in the meantime I am putting all my tables in non-responsive mode unfortunately for myself, because the responsive mode is just too buggy..

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    I think this is a effectively a duplicate of your other thread.

    Allan

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    yes, it is sort of , thank u Allan

This discussion has been closed.