Skip to content

Commit

Permalink
[frontend] Fix default sortBy for some screens in data
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHassine committed Jan 24, 2024
1 parent c8125ab commit c0a5db7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,15 @@ const StixCoreObjectsTimeline = ({
),
}}
variant="outlined"
className=".noDrag"
className="noDrag"
>
<ItemIcon type={stixCoreObject.entity_type} />
</TimelineDot>
</Link>
<TimelineConnector />
</TimelineSeparator>
<TimelineContent>
<Paper variant="outlined" classes={{ root: classes.paper }} className=".noDrag">
<Paper variant="outlined" classes={{ root: classes.paper }} className="noDrag">
<Typography variant="h2">
{defaultValue(stixCoreObject)}
</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ const StixRelationshipsTimeline = ({
<TimelineConnector />
</TimelineSeparator>
<TimelineContent>
<Paper variant="outlined" classes={{ root: classes.paper }} className=".noDrag">
<Paper variant="outlined" classes={{ root: classes.paper }} className="noDrag">
<Typography variant="h2">
{defaultValue(remoteNode)}
</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const CsvMappers = () => {
{
sortBy: 'name',
orderAsc: false,
view: 'lines',
searchTerm: '',
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Feed = () => {
orderAsc: params.orderAsc !== false,
searchTerm: params.searchTerm ?? '',
view: params.view ?? 'lines',
sortBy: params.sortBy,
sortBy: params.sortBy ?? 'name',
});

function saveView() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Stream extends Component {
LOCAL_STORAGE_KEY,
);
this.state = {
sortBy: propOr('name', 'sortBy', params),
orderAsc: propOr(true, 'orderAsc', params),
searchTerm: propOr('', 'searchTerm', params),
view: propOr('lines', 'view', params),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Taxii = () => {
orderAsc: params.orderAsc !== false,
searchTerm: params.searchTerm ?? '',
view: params.view ?? 'lines',
sortBy: params.sortBy,
sortBy: params.sortBy ?? 'name',
});

const saveView = () => {
Expand Down

0 comments on commit c0a5db7

Please sign in to comment.