Inline editing drop down selector bug

Inline editing drop down selector bug

MSLtdMSLtd Posts: 56Questions: 5Answers: 4
edited July 2018 in Free community support

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:

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    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

  • MSLtdMSLtd Posts: 56Questions: 5Answers: 4

    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

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Rather than needing to use the blur event yourself, set the onBlur option of the form-options parameter (probably in the same place as you set scope if you went with that method!).

    Allan

  • MSLtdMSLtd Posts: 56Questions: 5Answers: 4

    Another wonderfully easy solution, thank you very much Allan :)

This discussion has been closed.