@@ -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 ) ;
@@ -81,12 +81,17 @@ export class ComboBoxListItemPicker extends React.Component<IComboBoxListItemPic
81
81
}
82
82
83
83
public async componentWillReceiveProps ( nextProps : IComboBoxListItemPickerProps ) : Promise < void > {
84
+ debugger ;
84
85
if ( nextProps . listId !== this . props . listId ) {
85
86
this . setState ( {
86
87
selectedItems : [ ] ,
87
88
} ) ;
88
89
await this . loadOptions ( nextProps , false ) ;
89
90
}
91
+ if ( nextProps . filter !== this . props . filter ) {
92
+
93
+ await this . loadOptions ( nextProps , false ) ;
94
+ }
90
95
if ( ! isEqual ( nextProps . defaultSelectedItems , this . props . defaultSelectedItems ) ) {
91
96
const selectedItems = this . _getSelectedItems ( nextProps ) ;
92
97
this . setState ( {
0 commit comments