Rally app settings in multiple mixins

37 Views Asked by At

If multiple mixins in the same app try to use settings, will they overwrite each other? In other words can multiple mixins have getSettingsFields?

getSettingsFields: function() {
        return [
            {
                field123: 'url',
                xtype: 'rallytextfield'
            }
        ];
    }
1

There are 1 best solutions below

0
Kyle Morse On

I think the last mixin in will win and replace all the other getSettingsFields methods. A lot of the time we'll just have one getSettingsField method in the actual app class but delegate the implementation out to a separate class:

https://github.com/RallyApps/app-catalog/blob/master/src/apps/board/BoardApp.js#L134

https://github.com/RallyApps/app-catalog/blob/master/src/apps/board/Settings.js