Search code examples
jqueryarraysalpacajs

AlpacaJS - Disable buttons on array field


I'm looking at the official documentation, but i did not find anything about disabling the top buttons of array object, is there any way to disable those buttons? I aslo tryed to set the param toolbar to {} or null, but the buttons are still there. Thanks in advance

enter image description here


Solution

  • That part in blue are 2 differents components the toolbar and the actionbar. There's no way to remove them in alpaca documentation, but everything is possible, all you can do is to create a custom template for the actionbar and use a new option like :

    "options": {
       "hideActionBar": true,
       ...
    }
    

    then in your custom template this is how to use your new option :

    {{#if options.hideActionBar}} ... {{/if}}
    

    Here's a working fiddle for this.