mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 17:47:00 -05:00
Fix/saved filters position (#6552)
* fix: move saved filters to end of dropdown with separator - Reorganized filter menu items to place 'saved filters' at the end - Added separator before 'saved filters' to distinguish from regular filters - Maintained alphabetical sorting for regular filter options Fixes #6535 * docs: add release notes * [autofix.ci] apply automated fixes * fixing typos * fix: use Menu.line for proper separator rendering * refactor: remove duplication by extracting saved filter from array * [autofix.ci] apply automated fixes --------- Co-authored-by: Salva <spenamedina@Salvas-MacBook-Pro.local> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -69,7 +69,6 @@ const filterFields = [
|
||||
'amount',
|
||||
'cleared',
|
||||
'reconciled',
|
||||
'saved',
|
||||
'transfer',
|
||||
].map(field => [field, mapField(field)]);
|
||||
|
||||
@@ -480,13 +479,22 @@ export function FilterButton<T extends RuleConditionEntity>({
|
||||
onMenuSelect={name => {
|
||||
dispatch({ type: 'configure', field: name });
|
||||
}}
|
||||
items={translatedFilterFields
|
||||
.filter(f => (exclude ? !exclude.includes(f[0]) : true))
|
||||
.sort()
|
||||
.map(([name, text]) => ({
|
||||
name,
|
||||
text: titleFirst(text),
|
||||
}))}
|
||||
items={[
|
||||
...translatedFilterFields
|
||||
.filter(f => (exclude ? !exclude.includes(f[0]) : true))
|
||||
.sort()
|
||||
.map(([name, text]) => ({
|
||||
name,
|
||||
text: titleFirst(text),
|
||||
})),
|
||||
|
||||
Menu.line,
|
||||
|
||||
{
|
||||
name: 'saved',
|
||||
text: titleFirst(mapField('saved')),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Popover>
|
||||
|
||||
|
||||
6
upcoming-release-notes/6552.md
Normal file
6
upcoming-release-notes/6552.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [FictionFics]
|
||||
---
|
||||
|
||||
Move saved filters to end of dropdown with separator
|
||||
Reference in New Issue
Block a user