Skip to content

Commit 6925ea9

Browse files
committed
LocationPicker: spelling fix - seletedItem -> selectedItem
1 parent 60cb8b0 commit 6925ea9

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/controls/locationPicker/ILocationPicker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface ILocationPickerState {
6363
currentMode: Mode;
6464
searchText: string;
6565
isCalloutVisible: boolean;
66-
seletedItem: ILocationPickerItem;
66+
selectedItem: ILocationPickerItem;
6767
/**
6868
* The options available to the listPicker
6969
*/

src/controls/locationPicker/LocationPicker.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
2727
currentMode: Mode.view,
2828
searchText: null,
2929
isCalloutVisible: true,
30-
seletedItem: props.defaultValue,
30+
selectedItem: props.defaultValue,
3131
};
3232
}
3333
else {
@@ -36,7 +36,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
3636
currentMode: Mode.empty,
3737
searchText: null,
3838
isCalloutVisible: true,
39-
seletedItem: props.defaultValue,
39+
selectedItem: props.defaultValue,
4040
};
4141
}
4242

@@ -45,7 +45,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
4545
public componentWillReceiveProps(nextProps: ILocationPickerProps) {
4646
if (!isEqual(nextProps.defaultValue, this.props.defaultValue)) {
4747
if (nextProps.defaultValue) {
48-
this.setState({ seletedItem: nextProps.defaultValue, currentMode: Mode.view });
48+
this.setState({ selectedItem: nextProps.defaultValue, currentMode: Mode.view });
4949
}
5050
}
5151
}
@@ -88,7 +88,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
8888
}
8989

9090
private getMainContent = (): React.ReactNode => {
91-
const { options, seletedItem, currentMode } = this.state;
91+
const { options, selectedItem, currentMode } = this.state;
9292
const { className, disabled, placeholder, errorMessage } = this.props;
9393

9494
switch (currentMode) {
@@ -112,7 +112,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
112112
errorMessage={errorMessage}
113113
/>;
114114
case Mode.editView:
115-
if (seletedItem.EntityType === "Custom") {
115+
if (selectedItem.EntityType === "Custom") {
116116
return <div
117117
ref={this.focusRef}
118118
data-selection-index={0}
@@ -123,9 +123,9 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
123123
tabIndex={0}>
124124
<Persona
125125
data-is-focusable="false"
126-
imageAlt={seletedItem.EntityType}
126+
imageAlt={selectedItem.EntityType}
127127
tabIndex={0}
128-
text={seletedItem.DisplayName}
128+
text={selectedItem.DisplayName}
129129
title="Location"
130130
className={styles.persona}
131131
size={PersonaSize.size40}
@@ -152,12 +152,12 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
152152
tabIndex={0}>
153153
<Persona
154154
data-is-focusable="false"
155-
imageAlt={seletedItem.EntityType}
155+
imageAlt={selectedItem.EntityType}
156156
tabIndex={0}
157-
text={seletedItem.DisplayName}
157+
text={selectedItem.DisplayName}
158158
title="Location"
159159
className={styles.persona}
160-
secondaryText={this.getLocationText(seletedItem, "full")}
160+
secondaryText={this.getLocationText(selectedItem, "full")}
161161
size={PersonaSize.size40}
162162
onRenderInitials={this.customRenderInitials} />
163163
{!disabled ?
@@ -172,21 +172,21 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
172172
</div>;
173173

174174
case Mode.view:
175-
if (seletedItem.EntityType === 'Custom') {
175+
if (selectedItem.EntityType === 'Custom') {
176176
return <div className={styles.locationAddressContainer}
177177
onClick={this.onClick}>
178178
<div className={styles.locationContainer} tabIndex={0}>
179-
<div className={styles.locationDisplayName}>{seletedItem.DisplayName}</div>
179+
<div className={styles.locationDisplayName}>{selectedItem.DisplayName}</div>
180180
</div>
181181
</div>;
182182
}
183183

184184
return <div className={styles.locationAddressContainer} onClick={this.onClick}>
185185
<div className={styles.locationContainer} tabIndex={0}>
186-
<div className={styles.locationDisplayName}>{seletedItem.DisplayName}</div>
186+
<div className={styles.locationDisplayName}>{selectedItem.DisplayName}</div>
187187
<div className={styles.locationContent}>
188-
<div className={styles.locationAddress}>{this.getLocationText(seletedItem, "street")}</div>
189-
<div className={styles.locationAddress}>{this.getLocationText(seletedItem, "noStreet")}</div>
188+
<div className={styles.locationAddress}>{this.getLocationText(selectedItem, "street")}</div>
189+
<div className={styles.locationAddress}>{this.getLocationText(selectedItem, "noStreet")}</div>
190190
</div>
191191
</div>
192192
</div>;
@@ -213,7 +213,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
213213
}
214214

215215
private onIconButtonClick = () => {
216-
this.setState({ currentMode: Mode.empty, seletedItem: null });
216+
this.setState({ currentMode: Mode.empty, selectedItem: null });
217217
}
218218

219219
private onClick = () => {
@@ -233,7 +233,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
233233
}
234234

235235
private onChange = (ev, option: ILocationBoxOption) => {
236-
this.setState({ seletedItem: option.locationItem, currentMode: Mode.editView },
236+
this.setState({ selectedItem: option.locationItem, currentMode: Mode.editView },
237237
() => {
238238
if (this.focusRef.current != null)
239239
this.focusRef.current.focus();

0 commit comments

Comments
 (0)