diff --git a/CHANGELOG.md b/CHANGELOG.md index 8780b689c..5707d1617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change history for ui-inventory +## [7.1.4] IN PROGRESS + +* Sort statistical code types on Statistical code settings page. Refs UIIN-1547. + ## [7.1.3](https://github.com/folio-org/ui-inventory/tree/v7.1.3) (2021-07-30) [Full Changelog](https://github.com/folio-org/ui-inventory/compare/v7.1.2...v7.1.3) diff --git a/src/settings/StatisticalCodeSettings.js b/src/settings/StatisticalCodeSettings.js index 2ecd817d2..191f2c0b1 100644 --- a/src/settings/StatisticalCodeSettings.js +++ b/src/settings/StatisticalCodeSettings.js @@ -70,14 +70,16 @@ class StatisticalCodeSettings extends React.Component { render() { const statisticalCodeTypes = _.get(this.props.resources, ['statisticalCodeTypes', 'records'], []); - const statisticalCodeTypesOptions = (statisticalCodeTypes).map(statisticalCodeType => ( - - )); + const statisticalCodeTypesOptions = (statisticalCodeTypes) + .sort((a, b) => a.name.localeCompare(b.name)) + .map(statisticalCodeType => ( + + )); const fieldComponents = { 'statisticalCodeTypeId': ({ fieldProps }) => (