mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: stabilize useMemo deps and add category search to sidebar
- Use activeSection instead of activeTreeInfo as useMemo dependency (activeTreeInfo is derived from activeSection, new object each render) - Add category label matching to sidebar autocomplete search filter to match global search behavior
This commit is contained in:
@@ -56,6 +56,8 @@ export function SettingsTreeSidebar({
|
||||
const translatedName = t(`admin.settings.settingNames.${formattedKey}`, formattedKey);
|
||||
if (translatedName.toLowerCase().includes(q)) return true;
|
||||
if (s.hint?.description?.toLowerCase().includes(q)) return true;
|
||||
const categoryLabel = t(`admin.settings.categories.${s.category.key}`, s.category.key);
|
||||
if (categoryLabel.toLowerCase().includes(q)) return true;
|
||||
return false;
|
||||
})
|
||||
.slice(0, 8)
|
||||
|
||||
Reference in New Issue
Block a user