File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
src/controls/listItemPicker Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export class ComboBoxListItemPicker extends React.Component<IComboBoxListItemPic
52
52
//query += filter;
53
53
let keyColumnName = keyColumnInternalName || "Id" ;
54
54
55
- if ( ! this . _options || listId !== this . props . listId ) {
55
+ if ( ! this . _options || listId !== this . props . listId || filter !== this . props . filter ) {
56
56
const listItems = await this . _listItemRepo . getListItemsByFilterClause ( query ,
57
57
listId ,
58
58
columnInternalName ,
@@ -61,12 +61,12 @@ export class ComboBoxListItemPicker extends React.Component<IComboBoxListItemPic
61
61
itemLimit || 100 ,
62
62
orderBy ) ;
63
63
64
- this . _options = listItems . map ( option => {
65
- return {
66
- key : option [ keyColumnName ] ,
67
- text : option [ columnInternalName || "Id" ]
68
- } ;
69
- } ) ;
64
+ this . _options = listItems . map ( option => {
65
+ return {
66
+ key : option [ keyColumnName ] ,
67
+ text : option [ columnInternalName || "Id" ]
68
+ } ;
69
+ } ) ;
70
70
}
71
71
72
72
const selectedItems = this . _getSelectedItems ( props ) ;
@@ -87,6 +87,10 @@ export class ComboBoxListItemPicker extends React.Component<IComboBoxListItemPic
87
87
} ) ;
88
88
await this . loadOptions ( nextProps , false ) ;
89
89
}
90
+ if ( nextProps . filter !== this . props . filter ) {
91
+
92
+ await this . loadOptions ( nextProps , false ) ;
93
+ }
90
94
if ( ! isEqual ( nextProps . defaultSelectedItems , this . props . defaultSelectedItems ) ) {
91
95
const selectedItems = this . _getSelectedItems ( nextProps ) ;
92
96
this . setState ( {
You can’t perform that action at this time.
0 commit comments