Skip to content

Polyfill react create ref#4182

Merged
dzearing merged 13 commits intomicrosoft:masterfrom
Markionium:polyfill-react-createRef
Mar 6, 2018
Merged

Polyfill react create ref#4182
dzearing merged 13 commits intomicrosoft:masterfrom
Markionium:polyfill-react-createRef

Conversation

@Markionium
Copy link
Copy Markdown
Member

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ npm run change

Description of changes

Adds createRef polyfill to prepare for object refs and to have typed refs.

Focus areas to test

(optional)

* master: (28 commits)
  Scrollable pane sort stickies (microsoft#4111)
  Allow ScrollablePane to accept native properties. (microsoft#4095)
  Sticky (microsoft#4091)
  Applying package updates.
  [ColorRectangle, Sticky] Fixed null root refs (microsoft#4099)
  DatePicker: order of callbacks for onSelectDate and onAfterMenuDismiss (microsoft#4092)
  Applying package updates.
  Alhenry fix split button props (microsoft#4090)
  Fixing ComboBox styling by reverting button classname move (microsoft#4088)
  Update CODEOWNERS
  Undoing terrible change.
  [DetailsList] Fixed focus test (microsoft#4087)
  Added icons package screener test (microsoft#4082)
  ContextualMenu: Fix ContextualMenuUtility imports (microsoft#4085)
  [ContextualMenu] Made disabled buttons focusable (microsoft#4074)
  Convert Check to mergeStyles (microsoft#3880)
  [DetailsList] Add public focusIndex function (microsoft#3852)
  ComboBox button should have data-is-focusable="false" (microsoft#4070)
  Applying package updates.
  Focus Zone: Allow Tab to Skip Selection (microsoft#4061)
  ...
* master: (51 commits)
  Applying package updates.
  No unused variable (microsoft#4173)
  Use correct _list ref string (microsoft#4168)
  Nav: wire a link to expand/collapse behavior if it has no URL but has children (microsoft#4171)
  Addressing Issue microsoft#4147 - Nav Buttons have invalid `aria-describedby` value (microsoft#4159)
  Fix issue 3608: DetailsList horizontal scroll (microsoft#4164)
  Update package.json
  Image SCSS to MergeStyles Part 2: Style Conversion (microsoft#4151)
  Applying package updates.
  [SpinButton] Consistent styles to Button and TextField (microsoft#4098)
  ChoiceGroup: Flex layout for image and icon options (microsoft#4137)
  Initial set of Keytips work in experiments (microsoft#4062)
  Updating tsconfig in button bundle.
  BaseExtendedPicker: Create contextmenu for renderedItem, fix auto focus (microsoft#3954)
  Dropdown: Custom render options for multiselect - Bug fix microsoft#3571  (microsoft#3589)
  Fix documentcard theming (microsoft#4155)
  BasePicker: Fix not used onBlur callback of inputProps (microsoft#4000) (microsoft#4131)
  Allow Elements as Callout targets (microsoft#4134)
  CommandBar: Fixed null commandItemWidths (microsoft#4136)
  add check for when this.suggestionElement may be undefined (microsoft#4157)
  ...
*/
export default class TodoForm extends BaseComponent<ITodoFormProps, ITodoFormState> {
private _textField!: ITextField;
private _textField: RefObject<ITextField> = createRef<ITextField>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it necessary to type this? Isn't it inferred by the assignment?

"changes": [
{
"comment": "",
"packageName": "@uifabric/experiments",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all change "none" can be deleted.


private _buttonElement: HTMLElement;
private _splitButtonContainer: HTMLElement;
private _buttonElement = createRef<HTMLElement>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! see, there is no reason to type the refs. It should be implied.

Copy link
Copy Markdown
Member Author

@Markionium Markionium Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, we should discuss this one though as it's related palantir/tslint#711 as i'm running into it when enabling typedef. (In the case of typedef it would require it ;))

@dzearing dzearing merged commit 25e736f into microsoft:master Mar 6, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Mar 6, 2018
* master:
  Applying package updates.
  Polyfill react create ref (microsoft#4182)
  [Pickers] Add async debounce option to BasePicker (microsoft#4163)
  Facepile conditionally rendering aria-describedby (microsoft#4183)
  Applying package updates.
  Addressing Issue microsoft#4174 - 5.59.0 crashing in <ImageBase> (microsoft#4185)
  Website fix: Remove PureComponent (microsoft#4186)
  Add Keytip and KeytipLayer to experiments export (microsoft#4184)
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants