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

Search dropdown shouldn't always be open #4826

Closed
Tracked by #4341
oskarleonard opened this issue Feb 21, 2023 · 0 comments
Closed
Tracked by #4341

Search dropdown shouldn't always be open #4826

oskarleonard opened this issue Feb 21, 2023 · 0 comments

Comments

@oskarleonard
Copy link
Contributor

oskarleonard commented Feb 21, 2023

Expected behavior

Setting options.enabled to false should override everything. For example:

Using useTransactions hook like this:

  const transactions = useTransactions({
    config: { params: { transactionID: search } },
    options: { enabled: isTxId },
  });

Should keep options.enabled in the useCustomInfiniteQuery hook.

Actual behavior

This code strips away the options.enabled completely.

  const response = useCustomInfiniteQuery({
    keys,
    config,
    options: { ...options, enabled: !!(client.socket || client.http) },
  });

Which results in the search dropdown always being open
image

Suggested fix

  const isEnabled = options?.enabled !== false && !!(client.socket || client.http);
  const response = useCustomInfiniteQuery({
    keys,
    config,
    options: { ...options, enabled: isEnabled },
  });
@oskarleonard oskarleonard changed the title Dont strip away options.enabled from useTransactions hook Search dropdown shouldnt always be open Feb 24, 2023
@oskarleonard oskarleonard changed the title Search dropdown shouldnt always be open Search dropdown shouldn't always be open Feb 24, 2023
@sridharmeganathan sridharmeganathan added this to the Sprint 94 milestone Feb 27, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Lisk Desktop Version 3.0.0 Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants