mirror of
https://github.com/stashapp/stash.git
synced 2025-12-29 11:45:56 +01:00
Add id to hierarchy filter checkbox input (#1842)
* add id to hierarchy filter checkbox input
This commit is contained in:
parent
655d3ae969
commit
602a32bd32
1 changed files with 11 additions and 0 deletions
|
|
@ -51,6 +51,16 @@ export const HierarchicalLabelValueFilter: React.FC<IHierarchicalLabelValueFilte
|
|||
onValueChanged(value);
|
||||
}
|
||||
|
||||
function criterionOptionTypeToIncludeID(): string {
|
||||
if (criterion.criterionOption.type === "studios") {
|
||||
return "include-sub-studios";
|
||||
}
|
||||
if (criterion.criterionOption.type === "childTags") {
|
||||
return "include-parent-tags";
|
||||
}
|
||||
return "include-sub-tags";
|
||||
}
|
||||
|
||||
function criterionOptionTypeToIncludeUIString(): MessageDescriptor {
|
||||
const optionType =
|
||||
criterion.criterionOption.type === "studios"
|
||||
|
|
@ -76,6 +86,7 @@ export const HierarchicalLabelValueFilter: React.FC<IHierarchicalLabelValueFilte
|
|||
|
||||
<Form.Group>
|
||||
<Form.Check
|
||||
id={criterionOptionTypeToIncludeID()}
|
||||
checked={criterion.value.depth !== 0}
|
||||
label={intl.formatMessage(criterionOptionTypeToIncludeUIString())}
|
||||
onChange={() => onDepthChanged(criterion.value.depth !== 0 ? 0 : -1)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue