Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseExtendedPicker: Create contextmenu for renderedItem, fix auto focus #3954

Merged
merged 6 commits into from
Mar 2, 2018

Conversation

amyngu
Copy link
Contributor

@amyngu amyngu commented Feb 12, 2018

Pull request checklist

  • Include a change request file using $ npm run change

Description of changes

  • Create component to wrap the rendered item, so users get contextual menu if certain props are present
  • Get rid of loading state (causes flashing when using async onResolveSuggestions
  • Fix auto focus on input afters suggestion selection
  • Change example to use async calls, to better reflect app environment

@amyngu
Copy link
Contributor Author

amyngu commented Feb 14, 2018

@dzearing @joschect ping :) I'd appreciate a review!

}
}

@autobind
private _beginEditing(item: IExtendedPersonaProps): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use begin and complete editing? You should be able to pass a dismiss function to contextualmenu that will handle some of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The contextual menu will not be open throughout the duration of this, so I don't think using this dismiss function is correct here.

item: IExtendedPersonaProps;
}

export class SelectedItemWithContextMenu extends BaseComponent<ISelectedItemWithContextMenuProps, IPeoplePickerItemState> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This almost feels too specific, could you style a button with contextualmenuitems to meet your needs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. I will revisit this and try and create a better abstraction to fit my needs

@dzearing
Copy link
Member

There's a weird conflict, can you fix @amyngu ?

@dzearing dzearing merged commit 1340339 into microsoft:master Mar 2, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Mar 4, 2018
* master: (30 commits)
  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)
  Addressing Issue microsoft#4143 - is-selected missing on ms-Nav-link (microsoft#4158)
  Aria selected (microsoft#4161)
  Move fabric to TypeScript 2.7.2 (microsoft#4153)
  Updating SearchBox examples to have the removed string in placeholder prop.
  ...
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Mar 5, 2018
* 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)
  ...
chrismohr pushed a commit to chrismohr/office-ui-fabric-react that referenced this pull request Apr 17, 2018
…us (microsoft#3954)

* add some fixes

* create contextual menu item wrapper - convert results to promise in example

* add editing item margin, and fix on suggestionSelected focus

* add change file

* fix tslint issues
@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.

None yet

3 participants