0

At the moment I have spinner next to my search field, but it's wonky.

What is preferred way to display spinners for search fields?

Current solutions is...

screenshot

Essentially I want something similar that's done in some buttons that Salesforce use themselves:

        <lightning:button>
            hey
            <lightning:spinner/>
        </lightning:button>

button overlay example

4
  • What does your actual code look like? A proof of concept would help a long ways in fixing the issue.
    – sfdcfox
    May 1, 2019 at 4:13
  • Well was hoping to get some code out as an answer. Don't wanna fix existing issue, I wanna see if there's official way to overlay spinner over input field. I've seen buttons with spinners inside, but can't find that code anymore...
    – dzh
    May 1, 2019 at 4:29
  • Found example with button, same idea - put spinner in input element body doesn't work.
    – dzh
    May 1, 2019 at 4:35
  • Try wrapping lightning button inside a div with class 'slds-is-relative'.
    – Raul
    May 1, 2019 at 7:26

1 Answer 1

1

This link might help you.

https://developer.salesforce.com/docs/component-library/bundle/lightning:input/example#lightningcomponentdemo:exampleInputSearchWithSpinner

Type something and then press enter, you will see the loading spinner there.

1
  • 1
    Excellent! Exactly what I needed!
    – dzh
    May 1, 2019 at 11:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .