Skip to content

Commit 3efc850

Browse files
committed
fix of #929
1 parent 2ee21a9 commit 3efc850

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/controls/fieldCollectionData/collectionDataViewer/CollectionDataViewer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ export class CollectionDataViewer extends React.Component<ICollectionDataViewerP
147147
private addAndSave = () => {
148148
// Check if the item is not empty
149149
if (this.state.inCreationItem) {
150-
this.props.fOnSave([...this.state.crntItems, this.state.inCreationItem]);
150+
let crntItems = [...this.state.crntItems, this.state.inCreationItem];
151+
crntItems = this.updateSortProperty(crntItems);
152+
this.props.fOnSave(crntItems);
151153
} else {
152154
this.onSave();
153155
}
@@ -329,7 +331,7 @@ export class CollectionDataViewer extends React.Component<ICollectionDataViewerP
329331
<div>
330332
{
331333
this.props.executeFiltering &&
332-
<SearchBox onChanged={(newValue) => { this.setState({ searchFilter: newValue, currentPage: 1 }); }} placeholder={strings.CollectionDataSearch} className="FieldCollectionData__panel__search-box"/>
334+
<SearchBox onChanged={(newValue) => { this.setState({ searchFilter: newValue, currentPage: 1 }); }} placeholder={strings.CollectionDataSearch} className="FieldCollectionData__panel__search-box" />
333335
}
334336
<div className={`FieldCollectionData__panel__table ${styles.table} ${this.props.tableClassName || ""}`}>
335337
<div className={`FieldCollectionData__panel__table-head ${styles.tableRow} ${styles.tableHead}`}>

0 commit comments

Comments
 (0)