Inline editing drop down selector bug
Inline editing drop down selector bug
MSLtd
Posts: 56Questions: 5Answers: 4
When using inline editing, it seems to select the whole row and attempt to change just one field in said row, but fails to do this, and whenever inline edit is used on a row it changes a drop down selector in one of the columns back to it's default value, as well as the field being changed by the user.
How can this be fixed?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
When inline editing it will place the whole row into edit mode, but only one field (the one being edited) will be visible as editable to the end user. This allows the other fields in the row to be updated if needed via the API.
It is actually possible to change that to just the cell being edited using the
scope
property of the form options.When a
select
gets reset to its default value, it means that the current value is not in the list of options available. Without being able to see the page I can't say what the value and options are, but that's what to look for.Allan
Thanks Allan, that works wonders!
Can I quickly query one more thing:
I've changed my selector so that it submits
onBlur
instead of when the return key is pressed:js editor.field( 'line_item_status' ).input().on( 'blur', function () {
editor.submit();
} );
I'd like to do this for multiple fields and am wondering if there's an easy way about or, or if I'd have to copy and paste the above for each one?
Many Thanks
Rather than needing to use the
blur
event yourself, set theonBlur
option of theform-options
parameter (probably in the same place as you setscope
if you went with that method!).Allan
Another wonderfully easy solution, thank you very much Allan