Skip to content

Commit

Permalink
Preserve the order of the label attributes in the object item details. (
Browse files Browse the repository at this point in the history
#3945)

* preserve the order of the label attributes in the object item details

* updated changelog, cvat-ui v++
  • Loading branch information
Andrey Zhavoronkov authored Nov 24, 2021
1 parent c6ed6d1 commit 4632128
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed Interaction handler keyboard handlers (<https://github.com/openvinotoolkit/cvat/pull/3881>)
- Points of invisible shapes are visible in autobordering (<https://github.com/openvinotoolkit/cvat/pull/3931>)
- Order of the label attributes in the object item details(<https://github.com/openvinotoolkit/cvat/pull/3945>)

### Security
- TDB
Expand Down
4 changes: 2 additions & 2 deletions cvat-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cvat-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.27.0",
"version": "1.27.1",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ function ItemAttributesComponent(props: Props): JSX.Element {
collapsed, attributes, values, readonly, changeAttribute, collapse,
} = props;

const sorted = [...attributes].sort((a: any, b: any): number => a.inputType.localeCompare(b.inputType));

return (
<Row>
<Collapse
Expand All @@ -51,7 +49,7 @@ function ItemAttributesComponent(props: Props): JSX.Element {
onChange={collapse}
>
<Collapse.Panel header={<span style={{ fontSize: '11px' }}>Details</span>} key='details'>
{sorted.map(
{attributes.map(
(attribute: any): JSX.Element => (
<Row
key={attribute.id}
Expand Down

0 comments on commit 4632128

Please sign in to comment.