Skip to content

Commit 2222c83

Browse files
Merge pull request #1407 from joaojmendes/dev
Add Styles property to ListItemPicker and ComboBoxListItemPicker
2 parents 9dbd5ae + 784e4ca commit 2222c83

File tree

6 files changed

+39
-4
lines changed

6 files changed

+39
-4
lines changed

CHANGELOG.md

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

3+
## 3.13.0
4+
5+
### Enhancements
6+
7+
- `ListItemPicker`: use list name as well as GUID to point to list [#1355](https://github.com/pnp/sp-dev-fx-controls-react/issues/1355)
8+
9+
### Fixes
10+
11+
- `DateTimePicker`: broken link for `getErrorMessage` property fixed [#1277](https://github.com/pnp/sp-dev-fx-controls-react/pull/1381)
12+
13+
### Contributors
14+
15+
Special thanks to our contributors (in alphabetical order): [Edin Kapic](https://github.com/ekapic), [Harminder Singh](https://github.com/HarminderSethi).
16+
317
## 3.12.0
418

519
### Enhancements

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

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

3+
## 3.13.0
4+
5+
### Enhancements
6+
7+
- `ListItemPicker`: use list name as well as GUID to point to list [#1355](https://github.com/pnp/sp-dev-fx-controls-react/issues/1355)
8+
9+
### Fixes
10+
11+
- `DateTimePicker`: broken link for `getErrorMessage` property fixed [#1277](https://github.com/pnp/sp-dev-fx-controls-react/pull/1381)
12+
13+
### Contributors
14+
15+
Special thanks to our contributors (in alphabetical order): [Edin Kapic](https://github.com/ekapic), [Harminder Singh](https://github.com/HarminderSethi).
16+
317
## 3.12.0
418

519
### Enhancements

src/controls/listItemPicker/ComboBoxListItemPicker.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ export class ComboBoxListItemPicker extends React.Component<IComboBoxListItemPic
4141
.then((value) => {
4242
this.setState({...this.state,
4343
safeListId: value });
44-
this.loadOptions(this.props).then(() => { /* no-op; */}).catch(() => { /* no-op; */});
44+
this.loadOptions(this.props).then(() => { /* no-op; */}).catch(() => { /* no-op; */});
4545
})
46-
.catch(() => { /* no-op; */ });
46+
.catch(() => { /* no-op; */ });
4747
} else {
4848
this.loadOptions(this.props).then(() => { /* no-op; */}).catch(() => { /* no-op; */});
4949
}
@@ -151,6 +151,7 @@ export class ComboBoxListItemPicker extends React.Component<IComboBoxListItemPic
151151
return (
152152
<div className={styles.comboBoxListItemPickerWrapper}>
153153
<ComboBox label={this.props.label}
154+
styles={this.props.styles}
154155
options={this.state.availableOptions}
155156
autoComplete={this.props.autoComplete}
156157
comboBoxOptionStyles={this.props.comboBoxOptionStyles}

src/controls/listItemPicker/IComboBoxListItemPickerProps.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { IComboBoxOptionStyles } from "office-ui-fabric-react/lib/components/ComboBox";
1+
import { IComboBoxOptionStyles, IComboBoxStyles } from "office-ui-fabric-react/lib/components/ComboBox";
2+
23
import { IAutofillProps } from "office-ui-fabric-react/lib/components/Autofill";
34
import { IKeytipProps } from "office-ui-fabric-react/lib/components/Keytip";
45
import { SPHttpClient } from '@microsoft/sp-http';
@@ -30,4 +31,5 @@ export interface IComboBoxListItemPickerProps {
3031
onSelectedItem: (item: any) => void; // eslint-disable-line @typescript-eslint/no-explicit-any
3132
label?: string;
3233
orderBy?:string;
34+
styles?: IComboBoxStyles;
3335
}

src/controls/listItemPicker/IListItemPickerProps.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { IBasePickerStyles } from 'office-ui-fabric-react';
2+
13
import { BaseComponentContext } from '@microsoft/sp-component-base';
24

35
export interface IListItemPickerProps {
@@ -32,5 +34,6 @@ export interface IListItemPickerProps {
3234
* Enable default suggestions. All options are displayed by default when clicking on the control
3335
*/
3436
enableDefaultSuggestions?: boolean;
37+
styles? : IBasePickerStyles;
3538

3639
}

src/controls/listItemPicker/ListItemPicker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class ListItemPicker extends React.Component<IListItemPickerProps, IListI
4848
safeListId: value });
4949
this.ensureLoadField();
5050
})
51-
.catch(() => { /* no-op; */ });
51+
.catch(() => { /* no-op; */ });
5252
} else {
5353
this.ensureLoadField();
5454
}
@@ -93,6 +93,7 @@ export class ListItemPicker extends React.Component<IListItemPickerProps, IListI
9393
}
9494
<div id={this._tagPickerId}>
9595
<TagPicker onResolveSuggestions={this.onFilterChanged}
96+
styles={this.props.styles}
9697
onEmptyResolveSuggestions={(selectLists) => {
9798
if (this.props.enableDefaultSuggestions) {
9899
return this.onFilterChanged("", selectLists);

0 commit comments

Comments
 (0)