Skip to content

Commit a27de0d

Browse files
committed
fix(editor): avoid stale open-change fetch gating
1 parent 3458868 commit a27de0d

File tree

2 files changed

+4
-4
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components

2 files changed

+4
-4
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,11 @@ export const ComboBox = memo(function ComboBox({
453453
*/
454454
const handleOpenChange = useCallback(
455455
(open: boolean) => {
456-
if (open && (fetchedOptions.length === 0 || fetchError !== null)) {
456+
if (open) {
457457
void fetchOptionsIfNeeded(fetchError !== null)
458458
}
459459
},
460-
[fetchError, fetchOptionsIfNeeded, fetchedOptions.length]
460+
[fetchError, fetchOptionsIfNeeded]
461461
)
462462

463463
/**

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ export const Dropdown = memo(function Dropdown({
196196
*/
197197
const handleOpenChange = useCallback(
198198
(open: boolean) => {
199-
if (open && (fetchedOptions.length === 0 || fetchError !== null)) {
199+
if (open) {
200200
void fetchOptionsIfNeeded(fetchError !== null)
201201
}
202202
},
203-
[fetchError, fetchOptionsIfNeeded, fetchedOptions.length]
203+
[fetchError, fetchOptionsIfNeeded]
204204
)
205205

206206
const evaluatedOptions = useMemo(() => {

0 commit comments

Comments
 (0)