General Category > Help for ParamQuery Pro

Tab to next editable field stops when editable == function()

(1/1)

Ron Hess:
I've made editable into a function on one column, but now i'm seeing strange pattern in tabbing on this row

i added a function to return true or false, and make cells in a column selectively editable

I expected the tab-to-next input would skip over these fields to the next editable in this same row

instead i saw tabbing works normally until my column, then focus is shifted out of the grid to the bottom navigation elements.

interestingly, this works sometimes, and next i observe that when it allows forward tab nav, it does not work for shift-tab ( back tab)

$colM[7].editable = function (ui) {
       return ( ui.rowData['Product__r']['Pricebook_Entry_Required__c'] == false ) ;
    };

I'm probably missing something, but should i be managing focus if i turn off a cell in a row ?

paramvir:
You need not manage focus when you turn off editing for a cell.

Do you see any runtime error when focus is shifted out of the grid unexpectedly.

Ron Hess:
Yes, i am seeing this now
my callback is looking at ui.rowData, however in this case i see the exception

[15:49:25.112] TypeError: ui.rowData is undefined @ https://c.cs11.visual.force.com/... 733

the debugger shows my editable callback is getting called with incomplete UI object :
 rowData: undefined

see attachment

tracing back thru the call stack i see that isEditableCell is called with objP , and the same object which has rowIndx: NaN

this appears to be the cause of the exception since then rowData is not constructed prior to calling my editable function

paramvir:
Ron

I would send you the fixed version of the script shortly.


Ron Hess:
Great , thanks  :D

I can confirm that if i check for ui.rowData == undefined in my code, before i use it, that navigation proceeds correctly ( skips over my cell)

Navigation

[0] Message Index

Go to full version