Skip to content

Commit 3704e4e

Browse files
committed
Fixed issue with changelog.json
2 parents 811259d + cd9d8d2 commit 3704e4e

File tree

15 files changed

+141
-38
lines changed

15 files changed

+141
-38
lines changed

CHANGELOG.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@
55
"changes": {
66
"new": [],
77
"enhancements": [
8-
"`Dynamic Form`: Allow to hide fields [#1307](https://github.com/pnp/sp-dev-fx-controls-react/pull/1307)"
8+
"`DynamicForm`: Add taxonomy tree to test harness [#1269](https://github.com/pnp/sp-dev-fx-controls-react/pull/1269)",
9+
"`ModernTaxonomyPicker`: ability to disallow selecting children [#1279](https://github.com/pnp/sp-dev-fx-controls-react/pull/1279)",
10+
"`PeoplePicker`: Use webAbsoluteUrl if provided through props to ensure user [#1273](https://github.com/pnp/sp-dev-fx-controls-react/issues/1273)",
11+
"`DynamicForm`: Allow to hide fields [#1307](https://github.com/pnp/sp-dev-fx-controls-react/pull/1307)"
12+
],
13+
"fixes": [
14+
"`PeoplePicker`: fixes where people picker returns no results [#1292](https://github.com/pnp/sp-dev-fx-controls-react/issues/1292)",
15+
"`FilePicker`: Tile view fix [#1272](https://github.com/pnp/sp-dev-fx-controls-react/issues/1272)"
916
]
1017
},
1118
"contributions": [
19+
"[Chad Eiserloh](https://github.com/c-eiser13)",
20+
"[Hilton Giesenow](https://github.com/HiltonGiesenow)",
21+
"[Jake Stanger](https://github.com/JakeStanger)",
22+
"[Victor Romanov](https://github.com/VRomanovTau)",
1223
"[Paolo Pialorsi](https://github.com/PaoloPia)"
1324
]
1425
},

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Releases
22

3+
## 3.11.0
4+
5+
### Enhancements
6+
7+
- `Dynamic Form`: Allow to hide fields [#1307](https://github.com/pnp/sp-dev-fx-controls-react/pull/1307)
8+
9+
### Contributors
10+
11+
Special thanks to our contributor: [Paolo Pialorsi](https://github.com/PaoloPia).
12+
313
## 3.10.0
414

515
### Enhancements

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Releases
22

3+
## 3.11.0
4+
5+
### Enhancements
6+
7+
- `Dynamic Form`: Allow to hide fields [#1307](https://github.com/pnp/sp-dev-fx-controls-react/pull/1307)
8+
9+
### Contributors
10+
11+
Special thanks to our contributor: [Paolo Pialorsi](https://github.com/PaoloPia).
12+
313
## 3.10.0
414

515
### Enhancements

docs/documentation/docs/controls/ModernTaxonomyPicker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ The ModernTaxonomyPicker control can be configured with the following properties
177177
| isBlocking | boolean | no | Whether the panel uses a modal overlay or not. |
178178
| onRenderActionButton | function | no | Optional custom renderer for adding e.g. a button with additional actions to the terms in the tree view. |
179179
| isPathRendered | boolean | no | Whether the terms will be rendered with the term label or the full path up to the root. |
180+
| allowSelectingChildren | boolean | no | Whether child terms can be selected. Default value is true. |
180181

181182
## Standalone TaxonomyTree control
182183

src/controls/filePicker/controls/FileBrowser/FileBrowser.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class FileBrowser extends React.Component<IFileBrowserProps, IFileBrowser
196196
/>) :
197197
(<TilesList
198198
fileBrowserService={this.props.fileBrowserService}
199-
filePickerResult={this.state.filePickerResults ? this.state.filePickerResults[0] : null}
199+
filePickerResults={this.state.filePickerResults ? this.state.filePickerResults : null}
200200
selection={this._selection}
201201
items={this.state.items}
202202
onFolderOpen={this._handleOpenFolder}
@@ -519,6 +519,8 @@ export class FileBrowser extends React.Component<IFileBrowserProps, IFileBrowser
519519
newItems.push(null);
520520
}
521521

522+
this._selection.setItems(newItems);
523+
522524
if (!concatenateResults) {
523525
// de-select anything that was previously selected
524526
this._selection.setAllSelected(false);

src/controls/filePicker/controls/TilesList/ITilesListProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { IFilePickerResult } from "../../FilePicker.types";
55

66
export interface ITilesListProps {
77
fileBrowserService: FileBrowserService;
8-
filePickerResult: IFilePickerResult;
8+
filePickerResults: IFilePickerResult[];
99
selection: Selection;
1010
items: IFile[];
1111

src/controls/filePicker/controls/TilesList/TilesList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class TilesList extends React.Component<ITilesListProps> {
5252
}
5353

5454
public componentDidUpdate(prevProps: ITilesListProps): void {
55-
if (this.props.filePickerResult !== prevProps.filePickerResult) {
55+
if (this.props.filePickerResults !== prevProps.filePickerResults) {
5656
this._listElem.forceUpdate();
5757
}
5858
}
@@ -163,7 +163,7 @@ export class TilesList extends React.Component<ITilesListProps> {
163163
this.props.onNextPageDataRequest();
164164
return null;
165165
}
166-
const isSelected: boolean = this.props.filePickerResult && item.absoluteUrl === this.props.filePickerResult.fileAbsoluteUrl;
166+
const isSelected: boolean = this.props.filePickerResults.filter(x => x.fileAbsoluteUrl === item.absoluteUrl).length > 0;
167167

168168
// I know this is a lot of divs and spans inside of each other, but my
169169
// goal was to mimic the HTML and style of the out-of-the-box file picker

src/controls/modernTaxonomyPicker/ModernTaxonomyPicker.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface IModernTaxonomyPickerProps {
6161
isLightDismiss?: boolean;
6262
isBlocking?: boolean;
6363
onRenderActionButton?: (termStoreInfo: ITermStoreInfo, termSetInfo: ITermSetInfo, termInfo?: ITermInfo) => JSX.Element;
64+
allowSelectingChildren?: boolean;
6465
}
6566

6667
export function ModernTaxonomyPicker(props: IModernTaxonomyPickerProps): JSX.Element {
@@ -160,15 +161,20 @@ export function ModernTaxonomyPicker(props: IModernTaxonomyPickerProps): JSX.Ele
160161
if (filter === '') {
161162
return [];
162163
}
163-
const filteredTerms = await taxonomyService.searchTerm(Guid.parse(props.termSetId), filter, currentLanguageTag, props.anchorTermId ? Guid.parse(props.anchorTermId) : Guid.empty);
164+
const filteredTerms = await taxonomyService.searchTerm(Guid.parse(props.termSetId), filter, currentLanguageTag, props.anchorTermId ? Guid.parse(props.anchorTermId) : Guid.empty, props.allowSelectingChildren);
165+
164166
const filteredTermsWithParentInformation = props.isPathRendered ? await addParentInformationToTerms(filteredTerms) : filteredTerms;
165167
const filteredTermsWithoutSelectedItems = filteredTermsWithParentInformation.filter((term) => {
166168
if (!selectedItems || selectedItems.length === 0) {
167169
return true;
168170
}
169171
return selectedItems.every((item) => item.id !== term.id);
170172
});
171-
const filteredTermsAndAvailable = filteredTermsWithoutSelectedItems.filter((term) => term.isAvailableForTagging.filter((t) => t.setId === props.termSetId)[0].isAvailable);
173+
174+
const filteredTermsAndAvailable = filteredTermsWithoutSelectedItems
175+
.filter((term) =>
176+
term.isAvailableForTagging
177+
.filter((t) => t.setId === props.termSetId)[0].isAvailable);
172178
return filteredTermsAndAvailable;
173179
}
174180

@@ -329,6 +335,7 @@ export function ModernTaxonomyPicker(props: IModernTaxonomyPickerProps): JSX.Ele
329335
themeVariant={props.themeVariant}
330336
termPickerProps={props.termPickerProps}
331337
onRenderActionButton={props.onRenderActionButton}
338+
allowSelectingChildren={props.allowSelectingChildren}
332339
/>
333340
</div>
334341
)

src/controls/modernTaxonomyPicker/taxonomyPanelContents/TaxonomyPanelContents.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export interface ITaxonomyPanelContentsProps {
3939
themeVariant?: IReadonlyTheme;
4040
termPickerProps?: Optional<IModernTermPickerProps, 'onResolveSuggestions'>;
4141
onRenderActionButton?: (termStoreInfo: ITermStoreInfo, termSetInfo: ITermSetInfo, termInfo: ITermInfo, updateTaxonomyTreeViewCallback?: (newTermItems?: ITermInfo[], updatedTermItems?: ITermInfo[], deletedTermItems?: ITermInfo[]) => void) => JSX.Element;
42+
allowSelectingChildren?: boolean;
4243
}
4344

4445
export function TaxonomyPanelContents(props: ITaxonomyPanelContentsProps): React.ReactElement<ITaxonomyPanelContentsProps> {
@@ -114,6 +115,7 @@ export function TaxonomyPanelContents(props: ITaxonomyPanelContentsProps): React
114115
onRenderActionButton={props.onRenderActionButton}
115116
hideDeprecatedTerms={true}
116117
showIcons={false}
118+
allowSelectingChildren={props.allowSelectingChildren}
117119
/>
118120
</div>
119121
);

src/controls/modernTaxonomyPicker/taxonomyTree/TaxonomyTree.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface ITaxonomyTreeProps {
5858
selection?: Selection<any>; // eslint-disable-line @typescript-eslint/no-explicit-any
5959
hideDeprecatedTerms?: boolean;
6060
showIcons?: boolean;
61+
allowSelectingChildren?: boolean;
6162
}
6263

6364
export function TaxonomyTree(props: ITaxonomyTreeProps): React.ReactElement<ITaxonomyTreeProps> {
@@ -228,7 +229,7 @@ export function TaxonomyTree(props: ITaxonomyTreeProps): React.ReactElement<ITax
228229
level: 1,
229230
isCollapsed: true,
230231
data: { skiptoken: '', term: term },
231-
hasMoreData: term.childrenCount > 0,
232+
hasMoreData: props.allowSelectingChildren !== false && term.childrenCount > 0,
232233
};
233234
if (g.hasMoreData) {
234235
g.children = [];

0 commit comments

Comments
 (0)