Fluentui: [Pivot] Log warning, throw error, and/or add documentation that Pivot children must be PivotItem

Created on 30 Oct 2018  路  3Comments  路  Source: microsoft/fluentui

Actual behavior:

If Pivot's children aren't of type PivotItem, nothing is rendered. There's no warning or explanation in the console, and no note about this requirement in the docs.

Expected behavior:

I'm not arguing the requirement that Pivot's children must be of type PivotItem, but some documentation or warning (preferably warning in the console) can go a long way here. A colleague and I were using Pivot and chose to make a custom component that wraps PivotItem. Using that custom component results in nothing be rendered and it took a while to debug the issue.

Priorities and help requested:

Are you willing to submit a PR to fix? Yes

Requested priority: Low

Documentation Pivot Type

Most helpful comment

I think this is a reasonable request. We don't typically throw in cases like these, but I think it's ok to log a warning and update the documentation. Could possibly be addressed alongside the fix for #6294.

All 3 comments

I think this is a reasonable request. We don't typically throw in cases like these, but I think it's ok to log a warning and update the documentation. Could possibly be addressed alongside the fix for #6294.

@JasonGore That'd be awesome! Thank you, Jason.

(Sorry for this late notification - I was struggling with technical difficulties but that should all be resolved moving forward.)

:tada:This issue was addressed in #6909, which was successfully released as [email protected].:tada:

Handy Links:

Was this page helpful?
0 / 5 - 0 ratings