Can't update select value with Selectize plug-in

Can't update select value with Selectize plug-in

mc2devmc2dev Posts: 33Questions: 6Answers: 0
edited January 2022 in Select

Hello,

  1. Since I'm using Selectize plug-in for the field "title" of my table, I can't update value (bubble).
  2. The inline create works but only when my mouse click out of the select. I want that user can't type enter to create a new row.

Do you have any ideas about these curious behaviors?

Thanks for your help!

Replies

  • mc2devmc2dev Posts: 33Questions: 6Answers: 0

    Hi again,

    I tried to add the onReturn form-option on my inline create and bubble edit but it doesn't work as expected :

    editor.inlineCreate(this, {
            onReturn: 'submit', // Doesn't work...
            onBlur: 'submit', // Works well 
    })
    
    editor.bubble(this, {
              onReturn: 'submit', // Doesn't work...
              onBlur: 'submit', // Works well 
    })
    

    As you can see on these two code snippets, the onBlur option works perfectly on both but onReturn is ignored for no reason...

    Thanks for your support!

  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin

    Hi,

    Thanks for flagging that up. Add the following to the Selectize plug-in for Editor:

        canReturnSubmit: function () {
            return true;
        }
    

    That should do the job. Plug-ins need to specifically indicate if return can be used to submit the form.

    I'll get the plug-in on the site updates for that.

    Regards,
    Allan

  • mc2devmc2dev Posts: 33Questions: 6Answers: 0

    Thank you for your answer Allan,

    It works perfectly!

Sign In or Register to comment.