Skip to content

Commit 879ae38

Browse files
committed
Fix for #63
1 parent 61f2892 commit 879ae38

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**New Controls**
66

7-
- `TaxonomyPicker` control got added [#22](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/22)
7+
- `TaxonomyPicker` control got added [#22](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/22) [#63](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/63)
88

99
## 1.2.5
1010

src/controls/taxonomyPicker/TaxonomyPicker.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ export class TaxonomyPicker extends React.Component<ITaxonomyPickerProps, ITaxon
129129
private onSave(): void {
130130
this.cancel = false;
131131
this.onClosePanel();
132+
// Trigger the onChange event
133+
this.props.onChange(this.state.activeNodes);
132134
}
133135

134136
/**
@@ -263,7 +265,12 @@ export class TaxonomyPicker extends React.Component<ITaxonomyPickerProps, ITaxon
263265
this.state.loaded === true && this.state.termSetAndTerms && (
264266
<div key={this.state.termSetAndTerms.Id} >
265267
<h3>{this.state.termSetAndTerms.Name}</h3>
266-
<TermParent anchorId={this.props.ancoreId} autoExpand={null} termset={this.state.termSetAndTerms} activeNodes={this.state.activeNodes} changedCallback={this.termsChanged} multiSelection={this.props.allowMultipleSelections} />
268+
<TermParent anchorId={this.props.ancoreId}
269+
autoExpand={null}
270+
termset={this.state.termSetAndTerms}
271+
activeNodes={this.state.activeNodes}
272+
changedCallback={this.termsChanged}
273+
multiSelection={this.props.allowMultipleSelections} />
267274
</div>
268275
)
269276
}

src/webparts/controlsTest/components/ControlsTest.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
197197

198198
<div className="ms-font-m">TaxonomyPicker tester:
199199
<TaxonomyPicker
200-
allowMultipleSelections={false}
200+
allowMultipleSelections={true}
201201
termsetNameOrID="Countries"
202202
// ancoreId="0ec2f948-3978-499e-9d3f-e51c4494d44c"
203203
panelTitle="Select Term"

0 commit comments

Comments
 (0)