Comments (8)
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.
Thank you for responses, now I can continue to work and test it.
from primereact.
#6407 i created pull request for this.
from primereact.
@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.
@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.
OH those props were just in the wrong place. I will fix.
from primereact.
They were in PT when they should have been in main props.
from primereact.
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)
- DataTable: Autocomplete with Dialog on cell editing is not working HOT 3
- DropDown with Groups HOT 3
- InputOTP: Keyboard shortcut paste not working in IntegerOnly HOT 1
- DataTable > Column: It doesn't show operators dropdown and value input when dynamic column is in-place. HOT 1
- AutoComplete Input Passthrough not passing through HOT 4
- Menu: The first item remain focused even after clicking on another item. HOT 3
- Dropdown: Simple primitive values showing empty items HOT 1
- DataTable: Column Reorder Indicator Incorrect
- Calendar: Prop typings are not working correctly HOT 5
- InputNumber: number formatting does not update when locale is set through PrimeReactContext HOT 1
- IconField: Reference error React is not defined, im using vite HOT 4
- Dropdown: Init-Value not working if options have label,value properties HOT 8
- DataTable: Reordering Columns Causes Duplication in Checkbox Column and Reorder Row Indicator Column HOT 1
- Dropdown: No longer shows options with simple primitive values HOT 1
- InputOtp: Setting Value does not clear display
- Password > Icon and Input render order > tabIndex issue HOT 1
- Typo error on the Theming page HOT 1
- DataTable: re-order + resizable fails HOT 2
- Typo error on `PrimeFlex` section of the Theming documentation HOT 1
- Readme typo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primereact.