Instances of Metadata entity aren't being correctly sorted - fixed
@@ -233,7 +233,12 @@ export default class Metadata extends React.Component {
loadData = async (filterModel) => {
this.setState({loading: true});
this.metadataRequest = new MetadataEntityFilter();
- await this.metadataRequest.send(filterModel);
+ let orderBy;
+ if (filterModel) {
+ orderBy = (filterModel.orderBy || [])
+ .map(o => ({...o, field: o.field === 'ID' ? 'externalId' : o.field}));
+ }
+ await this.metadataRequest.send(Object.assign({...filterModel}, {orderBy}));
if (this.metadataRequest.error) {
message.error(this.metadataRequest.error, 5);
this._currentMetadata = [];
