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

Comments

Projects
None yet
1 participant
@estruyf
Copy link
Collaborator

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 the enhancement label Feb 12, 2019

@estruyf estruyf added this to the 1.12.0 milestone Feb 12, 2019

@estruyf

This comment has been minimized.

Copy link
Collaborator 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
                  }]
                }} />

estruyf added a commit that referenced this issue Feb 13, 2019

estruyf added a commit that referenced this issue Feb 13, 2019

estruyf added a commit that referenced this issue Feb 13, 2019

@estruyf estruyf closed this Feb 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.