Hi
I have a problem with a service, this service have many DataCollection, and work fine but when i try to load multiselect view using the service get "TOO MUCH RECURSION " error,
Please help.
Thanks in advance.
//dataService.js
export default function init(app) {
/*Retorna todos los códigos de locales i18n*/
const othersdata = new webix.DataCollection({
[........]
});
/*return roles*/
const dataRoles = new webix.DataCollection({
url: "/api/getroles",
datatype: "json"
});
}
In app.js field into constructor
import { JetApp, HashRouter, plugins } from "webix-jet";
import recordService from "../sources/models/dataService";
[....]
export default class app extends JetApp {
constructor(config) {
const defaults = {
id: APPNAME,
[......]
this.setService("recordService", recordService(this));
}
When i try to use recordservice in a another page send too much recursion error.
import { JetView, plugins } from "webix-jet";
export default class RolesView extends JetView {
config(){
let dataroles= this.app.getService("recordService").dataRoles;
var selectRole = {
view: "multiselect",
label: _("permissions_form_title"),
id: "permissionRoles",
name: "permissionRoles",
labelWidth: 150,
options: dataroles,
labelPosition: "top")
};
[....]
}
}
Thanks in advance