Skip to content

Commit d466e95

Browse files
committed
2 parents d07aae3 + 091c95c commit d466e95

File tree

11 files changed

+337
-79
lines changed

11 files changed

+337
-79
lines changed

CHANGELOG.JSON

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"`TreeView`: Expand to selected [#559](https://github.com/pnp/sp-dev-fx-controls-react/issues/559)",
1313
"`DateTimePicker`: When using the datetimePicker I would like to have an opportunity to set maximum/minimum date like in Office UI Fabric [#497](https://github.com/pnp/sp-dev-fx-controls-react/issues/497)",
1414
"`TaxonomyPicker`: Added the `selectTerm`, `hideTerm`, and `disableTerm` actions [#578](https://github.com/pnp/sp-dev-fx-controls-react/issues/578)",
15+
"`TaxonomyPicker`: Added the functionality to enable/disable term actions on the fly [#578](https://github.com/pnp/sp-dev-fx-controls-react/issues/578)",
1516
"`Carousel`: indicators, slide animation, auto cycling, easier basic usage [#587](https://github.com/pnp/sp-dev-fx-controls-react/pull/587)"
1617
],
1718
"fixes": [

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
- `TreeView`: Expand to selected [#559](https://github.com/pnp/sp-dev-fx-controls-react/issues/559)
1111
- `DateTimePicker`: When using the datetimePicker I would like to have an opportunity to set maximum/minimum date like in Office UI Fabric [#497](https://github.com/pnp/sp-dev-fx-controls-react/issues/497)
1212
- `TaxonomyPicker`: Added the `selectTerm`, `hideTerm`, and `disableTerm` actions [#578](https://github.com/pnp/sp-dev-fx-controls-react/issues/578)
13+
- `TaxonomyPicker`: Added the functionality to enable/disable term actions on the fly [#578](https://github.com/pnp/sp-dev-fx-controls-react/issues/578)
14+
- `Carousel`: indicators, slide animation, auto cycling, easier basic usage [#587](https://github.com/pnp/sp-dev-fx-controls-react/pull/587)
1315

1416
### Fixes
1517

docs/documentation/docs/about/release-notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
- `TreeView`: Expand to selected [#559](https://github.com/pnp/sp-dev-fx-controls-react/issues/559)
1111
- `DateTimePicker`: When using the datetimePicker I would like to have an opportunity to set maximum/minimum date like in Office UI Fabric [#497](https://github.com/pnp/sp-dev-fx-controls-react/issues/497)
1212
- `TaxonomyPicker`: Added the `selectTerm`, `hideTerm`, and `disableTerm` actions [#578](https://github.com/pnp/sp-dev-fx-controls-react/issues/578)
13+
- `TaxonomyPicker`: Added the functionality to enable/disable term actions on the fly [#578](https://github.com/pnp/sp-dev-fx-controls-react/issues/578)
14+
- `Carousel`: indicators, slide animation, auto cycling, easier basic usage [#587](https://github.com/pnp/sp-dev-fx-controls-react/pull/587)
1315

1416
### Fixes
1517

docs/documentation/docs/controls/TaxonomyPicker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Since version `1.12.0`, you can apply term actions to all terms or specific ones
7777
value: `${term.Name} (updated)`
7878
};
7979
},
80-
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void) => (term && term.Name && term.Name === "internal")
80+
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void, setActionStateForTerm: (actionId: string, termId: string, type: "disabled" | "hidden", value: boolean) => void) => (term && term.Name && term.Name === "internal")
8181
},
8282
{
8383
title: "Hide term",
@@ -90,7 +90,7 @@ Since version `1.12.0`, you can apply term actions to all terms or specific ones
9090
value: true
9191
};
9292
},
93-
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void) => (term && term.Name && (term.Name.toLowerCase() === "help desk" || term.Name.toLowerCase() === "multi-column valo site page"))
93+
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void, setActionStateForTerm: (actionId: string, termId: string, type: "disabled" | "hidden", value: boolean) => void) => (term && term.Name && (term.Name.toLowerCase() === "help desk" || term.Name.toLowerCase() === "multi-column valo site page"))
9494
},
9595
{
9696
title: "Disable term",
@@ -103,7 +103,7 @@ Since version `1.12.0`, you can apply term actions to all terms or specific ones
103103
value: true
104104
};
105105
},
106-
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void) => (term && term.Name && term.Name.toLowerCase() === "secured")
106+
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void, setActionStateForTerm: (actionId: string, termId: string, type: "disabled" | "hidden", value: boolean) => void) => (term && term.Name && term.Name.toLowerCase() === "secured")
107107
},
108108
{
109109
title: "Disable or hide term",
@@ -122,7 +122,7 @@ Since version `1.12.0`, you can apply term actions to all terms or specific ones
122122
value: true
123123
};
124124
},
125-
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void) => true
125+
applyToTerm: (term: ITerm, triggerActionCb: (updateAction: UpdateAction) => void, setActionStateForTerm: (actionId: string, termId: string, type: "disabled" | "hidden", value: boolean) => void) => true
126126
}]
127127
}} />
128128
```
@@ -199,7 +199,7 @@ Interface `ITermAction`
199199
| iconName | string | no | Name of the icon to be used to display action |
200200
| hidden | boolean | no | Specify if the action is hidden. This could be used for instance when you want to invoke the action right after rendering. |
201201
| invokeActionOnRender | boolean | no | Specifies if you want to invoke the action on render |
202-
| applyToTerm | (currentTerm: ITerm) => Promise\<boolean\> \| boolean | yes | Method checks if the current term is supported |
202+
| applyToTerm | (currentTerm: ITerm, triggerActionCallback: (updateAction: UpdateAction) => void, setActionStateForTerm: (actionId: string, termId: string, type: "disabled" | "hidden", value: boolean) => void) => Promise\<boolean> \| boolean | yes | Method checks if the current term is supported for the action. The method provices a couple of additional callback functions to make it possibe to programatically change the terms and its actions. |
203203
| actionCallback | (spTermService: SPTermStorePickerService, currentTerm: ITerm) => Promise\<UpdateAction\> | yes | Method to be executed when action is fired |
204204

205205

0 commit comments

Comments
 (0)