Skip to content

Commit

Permalink
Addressed #6642 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDervishi committed Jul 21, 2023
1 parent 02478b0 commit 4aa25f8
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions app/assets/javascripts/Components/Modals/filter_modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,15 @@ export class FilterModal extends React.Component {
}}
defaultValue={I18n.t("activerecord.attributes.group.group_name")}
/>
<div
className={"order"}
onChange={e => {
this.props.mutateFilterData({
...this.props.filterData,
ascBool: !this.props.filterData.ascBool,
});
}}
data-testid={"radio-group"}
>
<div className={"order"} data-testid={"radio-group"}>
<input
type="radio"
checked={this.props.filterData.ascBool}
name="order"
id="Asc"
onChange={() => {}}
onChange={() => {
this.props.mutateFilterData({...this.props.filterData, ascBool: true});
}}
data-testid={"ascending"}
/>
<label htmlFor="Asc">{I18n.t("results.filters.ordering.ascending")}</label>
Expand All @@ -242,7 +235,9 @@ export class FilterModal extends React.Component {
checked={!this.props.filterData.ascBool}
name="order"
id="Desc"
onChange={() => {}}
onChange={() => {
this.props.mutateFilterData({...this.props.filterData, ascBool: false});
}}
data-testid={"descending"}
/>
<label htmlFor="Desc">{I18n.t("results.filters.ordering.descending")}</label>
Expand Down

0 comments on commit 4aa25f8

Please sign in to comment.