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

If you want to write it to the DOM, pass a string instead: in="true" ... #43

Open
gracefullight opened this issue Jan 18, 2018 · 10 comments

Comments

@gracefullight
Copy link
Contributor

gracefullight commented Jan 18, 2018

image

I got an error while rendering
StackGrid Component's Opacity:0 style attribute does not change 😢

I found a strange prop in the div element that render in the Grid Component.
image

and it comes GridItem Component
image

It looks like a react transition error 😢

Appreciate any help! 🙏

@wadackel
Copy link
Owner

Hi @brendaniel, Thank you for your valuable report 👍

If possible, it would be extremely helpful if you could provide reproducible minimal code!

@gracefullight
Copy link
Contributor Author

@tsuyoshiwada
I do not get an error after rebuilding with the same source, 😨
if there is an error again, I will upload code 👍

@Gurjap
Copy link

Gurjap commented Sep 6, 2018

import React, { Component } from 'react';
import { Button,Alert, Card, CardBody, CardFooter, Col, Container, Form, Input, InputGroup, InputGroupAddon, InputGroupText, Row } from 'reactstrap';
import {forgot_password} from "../../../hooks/functions";
import {Link} from "react-router-dom";

class ForgotPassword extends Component {
  constructor(){
    super();
    this.state = {
      loading: false,
      warningMessage:"",
      visible:false
    };
    this.onForgotPassword=this.onForgotPassword.bind(this);

    this.onDismiss = this.onDismiss.bind(this);
  }
  onDismiss() {
    this.setState({ visible: false });
  }
  onForgotPassword=(e)=>{
    e.preventDefault();
    let {email}=e.target;
    this.setState({
      loading:true
    });
    forgot_password({email:email.value})
      .then(data=>{
          this.setState({
            loading:false,
            visible:true,
            warningMessage:data.message
          });
      })
  };
  render() {
    return (
      <div className="app flex-row align-items-center">
        <Container>
          <Row className="justify-content-center">
            <Col md="6">
              <Card className="mx-4">
                <CardBody className="p-4">
                  <Alert color="info" isOpen={this.state.visible} toggle={this.onDismiss}>
                    {this.state.warningMessage}
                  </Alert>
                  <Form onSubmit={this.onForgotPassword}>
                    <h1>Forgot Password</h1>
                    <p className="text-muted">Enter your email to reset password</p>
                    <InputGroup className="mb-3">
                      <InputGroupAddon addonType="prepend">
                        <InputGroupText>@</InputGroupText>
                      </InputGroupAddon>
                      <Input type="text" placeholder="Email" autoComplete="email" name={"email"}/>
                    </InputGroup>
                    <Button color="success" block>Reset Password</Button>
                    <Link to={"/login"} color="success" block>Back to Login</Link>
                  </Form>
                </CardBody>
              </Card>
            </Col>
          </Row>
        </Container>
      </div>
    );
  }
}
export default ForgotPassword;

I am getting the same warning and this the code.
warning

@gracefullight gracefullight reopened this Sep 6, 2018
@Gurjap
Copy link

Gurjap commented Sep 17, 2018

Solved the Problem by removing this block attribute from Link Tag
<Link to={"/login"} color="success" block>Back to Login</Link>
changed to
<Link to={"/login"} color="success">Back to Login</Link>

@daydream05
Copy link

I'm having the same issue. Anyone else found a solution?

@Jezfx
Copy link

Jezfx commented Apr 14, 2019

Also getting the same error in the console and all span elements are set to opacity: 0

import React from 'react';
import StackGrid, { transitions, easings } from 'react-stack-grid';

class GridLayout extends React.Component {

  render(): JSX.Element {
    const transition = transitions.scaleDown;

    return (
      <StackGrid
        monitorImagesLoaded={true}
        columnWidth={300}
        duration={600}
        gutterWidth={15}
        gutterHeight={15}
        easing={easings.cubicOut}
        appearDelay={60}
        appear={transition.appear}
        appeared={transition.appeared}
        enter={transition.enter}
        entered={transition.entered}
        leaved={transition.leaved}
      >
        <div key="key1"><h1>Item 1</h1></div>
        <div key="key2"><h1>Item 2</h1></div>
        <div key="key3"><h1>Item 3</h1></div>
      </StackGrid>
    );
  }
}

export default GridLayout;

Screenshot 2019-04-14 at 20 02 27

@navedkhan012
Copy link

navedkhan012 commented May 28, 2019

class StatementRow extends Component {
render() {
const { withDraw, background, ...props } = this.props
return (

 **// Note: with error**  
**<StatementWrapper color={withDraw} background={background}>**
**// Note: after remove error** 
**<StatementWrapper color={withDraw ? 1 : 0} background={background}>**

<StatementWrapper color={withDraw ? 1 : 0} background={background}>

₹ 22,535
Credit withdrawn

12th May

)
}
}

//color={withDraw} with error
// color={withDraw ? 1 : 0} error remove afte add this condition
this is working fine on my project hopefully it will help you same errror i got

@Silverium
Copy link

In my case, it was the cookies. Removed all cookies and all cached storage, and automagically Addons tab shows again!

@rogerpoliver
Copy link

Thank you all! I'm learning ReactJS and ended here searching for a solution.

I changed from:
color={withDraw}
to:
color={withDraw ? 1 : 0}

and it works!

@Kang-Dayeon
Copy link

Kang-Dayeon commented Jul 12, 2023

I solved it like this!!
boolean type should be changed to string type
ex)
[component]

<TodoText completed={completedProps.toString()}>
    {todoItem.text}
</TodoText>

[styled-component]

const TodoText = styled.p<{ completed: string }>`
    font-size: 12px;
    padding: 0 10px;
    word-break: break-all;
    color: ${(props) => (props.completed === "true") ? '#999' : '#000'};
    text-decoration: ${(props) => (props.completed === "true") ? 'line-through' : 'none'} ;
`

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

9 participants