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

TaxonomyPicker: Ability to specify term actions #237

Closed
estruyf opened this issue Feb 12, 2019 · 1 comment
Closed

TaxonomyPicker: Ability to specify term actions #237

estruyf opened this issue Feb 12, 2019 · 1 comment
Milestone

Comments

@estruyf
Copy link
Member

estruyf commented Feb 12, 2019

Category

[x] Enhancement
[ ] Bug
[ ] Question

Version

Please specify what version of the library you are using: [latest]

Expected / Desired Behavior / Question

Have the ability for term actions. Like retrieving the labels of a specific term, and updating the display value.

@estruyf estruyf added this to the 1.12.0 milestone Feb 12, 2019
@estruyf
Copy link
Member Author

estruyf commented Feb 12, 2019

This has been implemented in PR #235 by @siata13

screenshot 2019-02-12 11 59 25

<TaxonomyPicker allowMultipleSelections={true}
                termsetNameOrID="Countries"
                panelTitle="Select Term"
                label="Taxonomy Picker"
                context={this.props.context}
                onChange={this.onServicePickerChange}
                isTermSetSelectable={false}
                termActions={{
                  actions: [{
                    title: "Update term label",
                    iconName: "LocaleLanguage",
                    id: "UpdateTermLabel",
                    actionCallback: async (taxService: SPTermStorePickerService, term: ITerm) => {
                      return {
                        updateActionType: UpdateType.updateTermLabel,
                        value: `${term.Name} (updated)`
                      };
                    },
                    applyToTerm: (term: ITerm) => (true) // Applying the action to all terms
                  }]
                }} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant