Skip to content

Commit 8f494f4

Browse files
committed
#165 - Control name change to ListItemPicker
1 parent f69b539 commit 8f494f4

File tree

17 files changed

+27
-27
lines changed

17 files changed

+27
-27
lines changed

CHANGELOG.JSON

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "1.10.0",
55
"changes": {
66
"new": [
7-
"`FieldPickerListData`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)"
7+
"`ListItemPicker`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)"
88
],
99
"enhancements": [
1010
"Dutch localization added [#100](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/100)",

CHANGELOG.md

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

55
**New control(s)**
66

7-
- `FieldPickerListData`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)
7+
- `ListItemPicker`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)
88

99
**Enhancements**
1010

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

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

55
**New control(s)**
66

7-
- `FieldPickerListData`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)
7+
- `ListItemPicker`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)
88

99
**Enhancements**
1010

src/FieldPickerListData.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/ListItemPicker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './controls/listItemPicker';

src/controls/fieldPickerListData/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/controls/fieldPickerListData/IFieldPickerListDataProps.ts renamed to src/controls/listItemPicker/IListItemPickerProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { WebPartContext } from "@microsoft/sp-webpart-base";
22
import { ApplicationCustomizerContext } from "@microsoft/sp-application-base";
33

4-
export interface IFieldPickerListDataProps {
4+
export interface IListItemPickerProps {
55
listId: string;
66
columnInternalName:string;
77
onSelectedItem: (item:any) => void;

src/controls/fieldPickerListData/IFieldPickerListDataState.ts renamed to src/controls/listItemPicker/IListItemPickerState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface IFieldPickerListDataState {
1+
export interface IListItemPickerState {
22
noresultsFoundText: string;
33
showError: boolean;
44
errorMessage: string;

src/controls/fieldPickerListData/FieldPickerListData.tsx renamed to src/controls/listItemPicker/ListItemPicker.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ import SPservice from "../../services/SPService";
44
import { escape } from "@microsoft/sp-lodash-subset";
55
import { TagPicker } from "office-ui-fabric-react/lib/components/pickers/TagPicker/TagPicker";
66
import { Label } from "office-ui-fabric-react/lib/Label";
7-
import { IFieldPickerListDataProps, IFieldPickerListDataState } from ".";
7+
import { IListItemPickerProps, IListItemPickerState } from ".";
88
import * as telemetry from '../../common/telemetry';
99

1010

11-
export class FieldPickerListData extends React.Component<IFieldPickerListDataProps, IFieldPickerListDataState> {
11+
export class ListItemPicker extends React.Component<IListItemPickerProps, IListItemPickerState> {
1212
private _value: any[];
1313
private _spservice: SPservice;
1414
private selectedItems: any[];
1515

16-
constructor(props: IFieldPickerListDataProps) {
16+
constructor(props: IListItemPickerProps) {
1717
super(props);
1818

19-
telemetry.track('FieldPickerListData', {});
19+
telemetry.track('ListItemPicker', {});
2020

2121
// States
2222
this.state = {
2323
noresultsFoundText: typeof this.props.noresultsFoundText === undefined ? strings.genericNoResultsFoundText : this.props.noresultsFoundText,
2424
showError: false,
2525
errorMessage: "",
26-
suggestionsHeaderText: typeof this.props.sugestedHeaderText === undefined ? strings.FieldPickerListDataSelectValue : this.props.sugestedHeaderText
26+
suggestionsHeaderText: typeof this.props.sugestedHeaderText === undefined ? strings.ListItemPickerSelectValue : this.props.sugestedHeaderText
2727
};
2828

2929
// Get SPService Factory
@@ -34,7 +34,7 @@ export class FieldPickerListData extends React.Component<IFieldPickerListDataPro
3434
this.selectedItems = [];
3535
}
3636

37-
public componentDidUpdate(prevProps: IFieldPickerListDataProps, prevState: IFieldPickerListDataState): void {
37+
public componentDidUpdate(prevProps: IListItemPickerProps, prevState: IListItemPickerState): void {
3838
if (this.props.listId !== prevProps.listId) {
3939
this.selectedItems = [];
4040
}
@@ -43,7 +43,7 @@ export class FieldPickerListData extends React.Component<IFieldPickerListDataPro
4343
/**
4444
* Render the field
4545
*/
46-
public render(): React.ReactElement<IFieldPickerListDataProps> {
46+
public render(): React.ReactElement<IListItemPickerProps> {
4747
const { className, disabled, itemLimit } = this.props;
4848

4949
return (

src/controls/listItemPicker/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// A file is required to be in the root of the /src directory by the TypeScript compiler
2+
export * from './IListItemPickerProps';
3+
export * from './IListItemPickerState';
4+
export * from './ListItemPicker';

0 commit comments

Comments
 (0)