Skip to content

Commit

Permalink
Updated changelog, version
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Jul 18, 2023
1 parent 092a433 commit 4759034
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## \[Unreleased]
### Added
- Multi-line text attributes supported (<https://github.com/opencv/cvat/pull/6458>)
- Now you can configure default attribute value for SELECT, RADIO types on UI
(<https://github.com/opencv/cvat/pull/6474>)

### Changed
- TDB
Expand Down
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.53.1",
"version": "1.53.2",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
32 changes: 19 additions & 13 deletions cvat-ui/src/components/labels-editor/label-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export default class LabelForm extends React.Component<Props> {
};

return (
<CVATTooltip title='Press enter to add a new value, click the item to select default value'>
<CVATTooltip title='Press enter to add a new value'>
<Form.Item
name={[key, 'values']}
rules={[
Expand All @@ -266,20 +266,26 @@ export default class LabelForm extends React.Component<Props> {
dropdownStyle={{ display: 'none' }}
tagRender={(props) => {
const attrs = this.formRef.current?.getFieldValue('attributes');
const isDefault = props.value === attrs[key].default_value;
return (
<Tag
color={props.value === attrs[key].default_value ? 'red' : undefined}
onClose={props.onClose}
onClick={() => {
attrs[key].default_value = props.value;
this.formRef.current?.setFieldsValue({
attributes: attrs,
});
}}
closable={props.closable}
<CVATTooltip
placement='bottom'
title={isDefault ? 'This value is default' : 'Click to set default value'}
>
{props.label}
</Tag>
<Tag
color={isDefault ? 'blue' : undefined}
onClose={props.onClose}
onClick={() => {
attrs[key].default_value = props.value;
this.formRef.current?.setFieldsValue({
attributes: attrs,
});
}}
closable={props.closable}
>
{props.label}
</Tag>
</CVATTooltip>
);
}}
/>
Expand Down

0 comments on commit 4759034

Please sign in to comment.