Revize dee53692
Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)
webapp/components/annotation/SubTagItem.tsx | ||
---|---|---|
3 | 3 |
import { Button } from 'antd'; |
4 | 4 |
import { useContext } from 'react'; |
5 | 5 |
import { TagCategoryContext } from '../../contexts/TagCategoryContext'; |
6 |
import { AnnotationContext } from '../../contexts/AnnotationContext'; |
|
6 | 7 |
|
7 | 8 |
/** |
8 | 9 |
* Creates a single tag item in a tag panel. |
... | ... | |
15 | 16 |
*/ |
16 | 17 |
const { selectTag } = useContext(TagCategoryContext); |
17 | 18 |
|
19 |
/** |
|
20 |
* Annotation context |
|
21 |
*/ |
|
22 |
const { submitting } = useContext(AnnotationContext); |
|
23 |
|
|
18 | 24 |
/** |
19 | 25 |
* Selects the sub tag. |
20 | 26 |
*/ |
... | ... | |
25 | 31 |
return ( |
26 | 32 |
<Container> |
27 | 33 |
<Row> |
28 |
<Button onClick={onSelectSubTag} className="w-100 text-start rounded"> |
|
34 |
<Button |
|
35 |
onClick={onSelectSubTag} |
|
36 |
className="w-100 text-start rounded" |
|
37 |
disabled={submitting} |
|
38 |
> |
|
29 | 39 |
{props.subTag.name} |
30 | 40 |
</Button> |
31 | 41 |
</Row> |
Také k dispozici: Unified diff
Disabling tag buttons when adding new tag occurrence