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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user