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.

Empty State Spinner Example not working with pf4

See original GitHub issue

When using the official Spinner Example with the latest pf4 (I’ve tried a few versions back with the same results). This Error is shown:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components)

Removing the <Title> fixes this problem. I don’t know why the Title is a problem here, all the other examples I’ve tired worked (even with a Title).

Repro: See this Codesandbox: https://x6ifk.csb.app/

Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around? Bug - Workaround: not having a title?

What is your product and what release version are you targeting? 4.12.2 and many earlier versions (I haven’t tried them all)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
redallencommented, May 22, 2020

Yes, headingLevel is now a required prop for title. Thanks for the assist @boaz0 !

1reaction
boaz0commented, May 22, 2020

Maybe I forgot to save it, is this working for you?

If not try and copy paste this code and tell me if it works:

  const Spinner = () => (
    <span className="pf-c-spinner" role="progressbar" aria-valuetext="Loading...">
      <span className="pf-c-spinner__clipper" />
      <span className="pf-c-spinner__lead-ball" />
      <span className="pf-c-spinner__tail-ball" />
    </span>
  )
  return (
    <EmptyState>
      <EmptyStateIcon variant="container" component={Spinner} />
      <Title size="lg" headingLevel="h4">
        Loading
      </Title>
    </EmptyState>
  );
Read more comments on GitHub >

github_iconTop Results From Across the Web

PF4 Table: Provide empty state support · Issue #1433 - GitHub
If I place the empty state components within the Table, the empty state component does not span columns.
Read more >
Release notes - PatternFly 4
Empty state : Added xl empty state to demo app and integration tests. (#4200). Notification drawer: Added new Notification Drawer Component (#4137).
Read more >
Android Spinner Example - Javatpoint
Let's write the code to display item on the spinner and perform event handling. File: MainActivity.java. package example.javatpoint.com.spinner; ...
Read more >
Android spinner shows EMPTY values - Stack Overflow
The issue i am facing is that the spinner controls shows EMPTY locations. For example if i have two locations, Location1 & Location2....
Read more >
Close Approximation of Two Platelet Factor 4 Tetramers by ...
Objective— Heparin-induced thrombocytopenia (HIT) is a prothrombotic drug reaction caused by antibodies that recognize positively charged platelet factor 4 ...
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