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

Spinners inside modals bug outer ones. #99

Open
BroOfBros opened this issue Jun 18, 2022 · 0 comments
Open

Spinners inside modals bug outer ones. #99

BroOfBros opened this issue Jun 18, 2022 · 0 comments

Comments

@BroOfBros
Copy link

Opening a modal containing a HOC (based) spinner bugs all outer spinners.
If the modal is destroyed (page refresh or simply removed from the DOM) the outer spinners are working again.
This is my Spinner code:

import React from "react";
import { promiseTrackerHoc } from "react-promise-tracker";

import { Spinner } from "react-bootstrap";

const PromiseSpinnerInner = ({
  promiseInProgress,
  animation = "border",
  size,
  variant,
  ...rest
}) => {
  if (promiseInProgress === false) return null;

  return (
    <Spinner
      as="span"
      animation={animation}
      size={size}
      variant={variant}
      {...rest}
    />
  );
};

const PromiseSpinner = promiseTrackerHoc(PromiseSpinnerInner);
export default PromiseSpinner;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant