Search code examples
fuelux

How to integrate Fuelux repeater in Aurelia?


I try to integrate Fuelux repeater in Aurelia app. The problem is that the columns are not rendering :


Solution

  • SOLVED. The problem was "columns" are defined in the Aurelia class. But in the ajax callback, "this" is undefined, the solution was to bind :

    defineRepeater() {
        let __this = this;
        // initialize the repeater
        ($('#myRepeater') as any).repeater({
            //init stuff
            dataSource: __this.customDataSource.bind(__this);
        });
    }
    
    customDataSource(options: any, callback) {
        let __this = this;
        ...
        columns: __this.columns
        ...
    }