Problem using a panels.

I'm trying to use the Panels kind, but I keep gettin the error.

lib\layout\src\Panels\Panels.js:226 Uncaught TypeError: this.setLayoutKind is not a function

I've include both the layout and cardarranger in the require sections, and just created a simple panels, as below

{kind: Panels, name: "pages", fit: true, draggable: true, components: [ {content: "Page 1"}, {content: "Page 2"}, {content: "Page 3"}, {content: "Page 4"} ]},

enyo pack runs with out error, I've look at the exmples and the docs, and I can't see what I'm missing.


  • TL;DR - Looks like we missed the Control dependency. Adding a require('enyo/Control') will fix it for you in the near term. I'll file a bug to get this fixed.

    enyo/Control sets itself as the default super kind. Many components in Enyo relied on this fact so they didn't correctly have kind: 'Control set in their component definition. When we migrated to modules, we added requires for super kinds when they were explicit and intended to add a require for enyo/Control for any that omitted it.

    If an app requires Control elsewhere (or requires a control that requires Control!), everything works as expected. Since most apps will do that, this bug snuck past.
  • Thanks for that, just adding the require to the layout.js did not fix it, but adding the kind: Control as well got it working.
Sign In or Register to comment.