question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

showLoading prop of SearchBar not working

See original GitHub issue

Before filling out an issue, be sure to check the version of react-native-elements you are using and the docs for that version over here.

Explain what you did I was trying to test the showLoading prop of the SearchBar by doing showLoading= {true}

Expected behaviour I expected the activity indicator icon of the search bar to show

Describe the bug The activity indicator icon didn’t show up

Your Environment (please complete the following information):

software version
react-native-elements 1.0.0
react-native 0.58.3
npm or yarn 6.7.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:18

github_iconTop GitHub Comments

4reactions
dave-vazquezcommented, Jan 12, 2021

I was able to solve this issue with the following implementation:

      <SearchBar
        lightTheme
        showLoading
        containerStyle={s.searchContainer}
        inputContainerStyle={s.inputContainer}
        loadingProps={{
          animating: searching,
          color: "black",
        }}
      />

I set animating in loadingProps to a boolean state variable, and to get the activity indicator to appear I just pass in a color that will show up with my custom styles.

Note that animating is set to true by default. You don’t have to set it equal to any particular value, but if you want it to appear conditionally this would be the way to do it.

0reactions
sanjeevyadavITcommented, Jan 27, 2021

@dave-vazquez Thanks I just set the color to black and it worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native [React Native Elements] Search Bar ...
I am using version Current Stable Version 0.19.0 which does not have a 'cancel' button property. Updates package.json to be version 1.0.0-beta4 ...
Read more >
10 Ways to Fix the Windows Search Bar Not Showing or ...
Updating Windows might just fix your Windows search bar not working problem. Press Win + I to launch the Settings app and select...
Read more >
SearchBar - React Native Elements
SearchBar. SearchBars are used to search or filter items. Use a SearchBar when the number of items directly impacts a user's ability to...
Read more >
How to add SearchBar in React Native ? - GeeksforGeeks
To add a SearchBar to your flatlist, the basic syntax looks like ... showLoading: This prop shows the loading ActivityIndicator effect.
Read more >
Angular: show loading indicator when obs$ | async is not yet ...
Let's imagine we use some component that takes loading property as an Input. How would you pass that property? <div *ngIf="obs$ | async...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found