Lists SDK

This section describes the functions and workflow for working with the SDK lists

The system has the ability to replace the standard list item editing card. To do this, you must set the connection area of the widget “catalogs” in the manifest.json, and then specify the directory id in which the custom card will be used instead of the usual one

In order to specify the directory id, it is necessary to call the special widget method setSdkCatalogId, passing the directory id to the argument until the widget’s settings are saved. You can do this, for example, in the callback onSave

Example:

onSave: _.bind(function () {
          this.setSdkCatalogId(this.params.catalog_id);
          return true;
}, self),

After setting up the settings, when you try to edit the directory element, the callback of the widget loadCatalogElement will be called. In this case, the standard edit card of the list item will not open.

loadCatalogElement: function (catalog_element) {
          console.log('Editing a catalog item #' + catalog_element.id);
},