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.

Having loading on Searchbar and TextInput Components

See original GitHub issue

Describe the feature

I am using Searchbar as follow:

        <Searchbar
          placeholder={`${t('homeView.search')}...`}
          value={cityOrPostalCode}
          onChangeText={this.onChangeText}
          loading={1}
          onSubmitEditing={this.submit}
        />

Motivation

So far, there is no way to switch the left icon, the right icon, or to add a component within the text to display an asynchronous task.

A use case would be a <Searchbar /> used for autocomplete, it will fetch some data.

So far I must create my own indicator, which most likely does not respect material ui guidelines

Thanks again for your time,

Dimitri

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
kopaxcommented, Apr 3, 2020

This features would be so much appreciated, yes that would be awesome.

I am just thinking, would it be nice to toggle the clear icon with a loading icon while searching something asynchronously (which is almost always the case)? I have another proposal in mind:

  • Keep icon for previous versions with a deprecation warning
  • Create leftIcon that will serve the purpose of icon
  • Keep clearIcon for clearing the search bar
  • Add rightIcon (for example for adding a spinner) displayed on the left of clearIcon in the <Searchbar />

Allow user to rearrange any of those 3 icons on it’s will

1reaction
brunohkbxcommented, Aug 4, 2020

It’s still open

Read more comments on GitHub >

github_iconTop Results From Across the Web

A search bar appears, but I CANNOT input text - Stack Overflow
I think the problem is , value={search}. this should be, value={this.state.search}. Or you should take state in a variable,
Read more >
Create a React Native search bar from scratch - LogRocket Blog
Learn how to create your own React Native search bar from scratch in this detailed, step-by-step tutorial.
Read more >
Searchbar · React Native Paper
Searchbar is a simple input box where users can type search queries. ... Set style of the TextInput component inside the searchbar.
Read more >
Search Bar in React JS! - DEV Community ‍ ‍
Creating the Search Bar ... Firstly, we will create the search bar which will be a basic text field. I will use Material...
Read more >
Create a Search Bar With React and Debounce Input - YouTube
Search is an important part of almost every application. But how can we make our search feel buttery smooth? In this video, we...
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