fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

DropDown's responsiveMode prop enum type should exposed from 'office-ui-fabric-react'

Open LiangMingChen opened this issue 7 years ago • 2 comments

Environment Information

  • Package version(s): (fill this out)
  • Browser and OS versions: (fill this out if relevant)

Please provide a reproduction of the bug in a codepen:

<Dropdown label={this.props.label} options={this.resolveOptions()} placeholder={this.props.placeholder} onRenderList={this.renderCalloutList} onRenderOption={this.props.customListElementRender} selectedKeys={this.props.selectedItems as string[]} multiSelect={this.props.multiSelect} onChange={this.props.onChange} disabled={this.props.isDisabled} styles={this.props.styles} errorMessage={this.props.errorMessage} onDismiss={this.onDropdownDismissed} calloutProps={calloutProps} responsiveMode={ResponsiveMode.large} />

Actual behavior:

ResponsiveMode is only available through directly linkinig into lib

https://github.com/OfficeDev/office-ui-fabric-react/blob/acefdefb12eec6c495d5ffe25625b7da9d17cf78/packages/example-app-base/src/components/App/App.tsx#L7

This specifically crash create-react-app https://github.com/facebook/create-react-app

Jest test enviroment which compiled by node (thus need commonjs module)

if we include reference for the enum type for the number from lib-commonjs folder, we end packing both office-ui-fabrid-react/lib and office-ui-fabric-react/lib-commonjs

Expected behavior:

Since a component is using by a component (in this case DropDown) The prop type should be available from the same level, ie 'office-ui-fabric-react'

import { ResponsiveMode } from 'office-ui-fabric-react'

Priorities and help requested:

Are you willing to submit a PR to fix? (Yes, No)

Requested priority: (Blocking, High, Normal, Low)

Products/sites affected: (if applicable)

LiangMingChen avatar May 08 '19 21:05 LiangMingChen

Thanks @LiangMingChen -- have created #9018 to fix.

jdhuntington avatar May 08 '19 23:05 jdhuntington

:tada:This issue was addressed in #9018, which has now been successfully released as [email protected].:tada:

Handy links:

msft-github-bot avatar May 10 '19 12:05 msft-github-bot