You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A collection List component supports either a render prop (function) OR children, but not both. There isn't a warning. It makes it easy to make a mistake that isn't obvious what's wrong.
Motivation
What are the key benefits if this suggest was included to Canvas-Kit?
Example
An example of an incorrect usage:
<Tabsitems={[{id: 'one',text: 'One'}]}><Tabs.List>{item=><Tabs.Itemdata-id={item.id}>{item.text}</Tabs.Item>}<div>Some other element</div></Tabs.List></Tabs>
Either a warning, or we do support this. The problem is the overflow button rendering is controlled by the Tabs.List and each Tabs.Item is measured. Any additional element will need to be hooked up to overflow detection. A common use-case is a "add tab" button in the list. To work around this, a tab is added to the items array that is only used to display "Add Tab"
The text was updated successfully, but these errors were encountered:
💡 Suggestion
A collection List component supports either a render prop (function) OR children, but not both. There isn't a warning. It makes it easy to make a mistake that isn't obvious what's wrong.
Motivation
What are the key benefits if this suggest was included to Canvas-Kit?
Example
An example of an incorrect usage:
Either a warning, or we do support this. The problem is the overflow button rendering is controlled by the
Tabs.List
and eachTabs.Item
is measured. Any additional element will need to be hooked up to overflow detection. A common use-case is a "add tab" button in the list. To work around this, a tab is added to the items array that is only used to display "Add Tab"The text was updated successfully, but these errors were encountered: