Skip to content

Commit

Permalink
fix(form-builder): remove distinctUntilChanged function from handleQu…
Browse files Browse the repository at this point in the history
…eryChange in referenceInput (#3901)
  • Loading branch information
ninaandal committed Nov 25, 2022
1 parent 13e14ab commit 0aeb3bb
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -261,7 +261,9 @@ export const ReferenceInput = forwardRef(function ReferenceInput(
const handleQueryChange = useObservableCallback((inputValue$: Observable<string | null>) => {
return inputValue$.pipe(
filter(nonNullable),
distinctUntilChanged(),
//This prevents a filter in a reference from updating when the dependent reference are updated.
//Worst case by removing - the function will be called when you enter the same string.
//distinctUntilChanged(),
switchMap((searchString) =>
concat(
of({isLoading: true}),
Expand Down

2 comments on commit 0aeb3bb

@vercel
Copy link

@vercel vercel bot commented on 0aeb3bb Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

studio-workshop – ./

studio-workshop.sanity.build
studio-workshop-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 0aeb3bb Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

Please sign in to comment.