diff --git a/src/js/customControls.js b/src/js/customControls.js index a17563782..cde0625ca 100644 --- a/src/js/customControls.js +++ b/src/js/customControls.js @@ -53,6 +53,7 @@ export default class customControls { } templateControl.definition = {} templateControl.label = type => _this.label(type) + templateControl.icon = type => _this.icon(type) this.templateControlRegister[templateName] = templateControl }) diff --git a/tests/control/custom.test.js b/tests/control/custom.test.js index 8c8caef7a..757e70a67 100644 --- a/tests/control/custom.test.js +++ b/tests/control/custom.test.js @@ -224,4 +224,33 @@ describe('Test Custom Control', () => { expect(renderedCtl.eq(1).attr('type')).toBe('text') expect(renderedCtl.eq(1).attr('id')).toMatch(new RegExp('^text-.*')) }) + + test('custom control with no icon', async () => { + const fbWrap = $('