Skip to content

Commit a97b25a

Browse files
authored
fix(BlueprintLibrary): flickering issue when searching - AB-850 (#1260)
1 parent c1837ec commit a97b25a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ui/src/builder/panels/BuilderBlueprintLibraryPanel.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ const blueprints = ref<
132132
}>
133133
>([]);
134134
const isLoading = ref(false);
135+
const hasLoadedOnce = ref(false);
135136
136137
const globalBlueprints = computed(() =>
137138
blueprints.value.filter((bp) => bp.isReadonly === true),
@@ -154,7 +155,10 @@ async function loadBlueprints() {
154155
return;
155156
}
156157
157-
isLoading.value = true;
158+
// Only show loading state on initial load, not during search refinements
159+
if (!hasLoadedOnce.value) {
160+
isLoading.value = true;
161+
}
158162
try {
159163
const results = await writerApi.listSharedBlueprints(
160164
orgId,
@@ -170,6 +174,7 @@ async function loadBlueprints() {
170174
isReadonly: Boolean(bp.isReadonly),
171175
createdBy: bp.createdBy,
172176
}));
177+
hasLoadedOnce.value = true;
173178
} catch (error) {
174179
pushToast({
175180
type: "error",
@@ -186,6 +191,8 @@ watch(searchQuery, debouncedLoadBlueprints);
186191
187192
function handleClose() {
188193
isOpen.value = false;
194+
hasLoadedOnce.value = false;
195+
searchQuery.value = "";
189196
}
190197
191198
watch(isOpen, (newValue) => {

0 commit comments

Comments
 (0)