Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tags): fixing tag autocomplete caching #2586

Merged
merged 2 commits into from
May 20, 2021

Conversation

gabe-lyons
Copy link
Contributor

Tag autocomplete used to cache on the client. This was problematic, since actions taken by the client could create new tags, in which case the cache would be invalid. Here I remove the caching so we always get most up to date autocomplete.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

@gabe-lyons gabe-lyons changed the title fix(tags): fixing tag autocomplete fix(tags): fixing tag autocomplete caching May 19, 2021
@@ -25,7 +25,9 @@ const TagSelect = styled(Select)`
const CREATE_TAG_VALUE = '____reserved____.createTagValue';

export default function AddTagModal({ updateTags, globalTags, visible, onClose }: AddTagModalProps) {
const [getAutoCompleteResults, { loading, data: suggestionsData }] = useGetAutoCompleteResultsLazyQuery();
const [getAutoCompleteResults, { loading, data: suggestionsData }] = useGetAutoCompleteResultsLazyQuery({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks good

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks Gabe

Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

LGTM!

@shirshanka shirshanka merged commit 158d65b into datahub-project:master May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants