fix(knowledgeBase): improve tag loading logic and ensure consistent behavior

- Updated the loadTags function to prevent unnecessary calls when tags are already loading, enhancing performance and user experience.
- Modified tag loading calls in various tag-related functions to ensure the reset parameter is consistently set to true, ensuring the tag list is refreshed correctly after operations like create, edit, and delete.
- Improved the FAQEntryManager component to handle tag loading more efficiently during scrolling and batch operations.
This commit is contained in:
wizardchen
2026-05-29 15:37:37 +08:00
committed by lyingbug
parent c07ab6988c
commit 7d1dfc78b7
3 changed files with 20 additions and 15 deletions
+2 -1
View File
@@ -124,7 +124,8 @@ func (r *knowledgeTagRepository) ListByKB(
var tags []*types.KnowledgeTag
if err := dataQuery.
Order("sort_order ASC, created_at DESC").
// seq_id tie-breaker keeps OFFSET pagination stable when sort_order and created_at collide.
Order("sort_order ASC, created_at DESC, seq_id DESC").
Offset(page.Offset()).
Limit(page.Limit()).
Find(&tags).Error; err != nil {