Closed FeltBoots closed 2 years ago
I used debugger and found the reason. I didn't pass the value to tabs view. It works now.
If you don't pass any value and context is undefined then there is an error with 'in' operator. There might be another check if context is not undefined.
let initValue =
'value' in config
? config.value
: name in context
? context[name]
: undefined;
I added check to undefined for context value in tabs.js view and it seems to work as expected. If you are agree I send PR with fix.
host.view.render()
expected to have 4 arguments: outputElement
, config
, data
and context
. In your case you omitted last two arguments and therefore got an error. When a component works with context
it expected that context
is non-nullish. I'm not sure a fix for tabs is needed. Also, you should avoid using host.view.render()
directly since it is intended for use in a component definition only.
Thanks! I realised your point about host.view.render()
. Now it works as expected.
I'm getting an error with this code snippet I took from tab.usage.js https://github.com/discoveryjs/discovery/blob/02798acce8e43f87a154bd23355a5d4222d440a3/src/views/tab.usage.js
I am getting an error:
TypeError: Cannot use 'in' operator to search for 'tabs' in undefined
. I have no idea how to work with it. Trying follow examples from surrounding repos and docs in readme but it does not work for me.