Code Monkey home page Code Monkey logo

Comments (8)

melloware avatar melloware commented on May 26, 2024 1

yeah but that is not correct. here is the proper way to use invalid with Passthrough.

https://stackblitz.com/edit/xmhzeu?file=src%2FApp.jsx

      <Password
        invalid
        pt={{
          input: ({ props }) => {
            if (props.invalid) return 'invalid-css-class';
          },
        }}
      />

that will add the invalid-css-class to the Password only if its invalid.

from primereact.

imnash21 avatar imnash21 commented on May 26, 2024 1

Thank you for responses, now I can continue to work and test it.

from primereact.

Rekl0w avatar Rekl0w commented on May 26, 2024

#6407 i created pull request for this.

from primereact.

melloware avatar melloware commented on May 26, 2024

@Rekl0w i fixed this the right way by removing those two PT props. If you want to use invalid in PT you would use the props.invalid on the input PT object

from primereact.

Rekl0w avatar Rekl0w commented on May 26, 2024

@melloware You deleted it from pt options but now there is no explanation for invalid at props too. I can add to there.

from primereact.

melloware avatar melloware commented on May 26, 2024

OH those props were just in the wrong place. I will fix.

from primereact.

melloware avatar melloware commented on May 26, 2024

They were in PT when they should have been in main props.

from primereact.

Rekl0w avatar Rekl0w commented on May 26, 2024

Okay but he mentioned that if he calls directly invalid, it gets error. That's why i added invalid={true}

from primereact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.