Comments (4)
Yes they are written manually and then the documentation is all generated off the TS. SO the website updates itself on build from the TS
from primereact.
Update
I found out, that we can pass parent
instead of props
and then use parent.props
.
const pt = {
input: {
// FIXME: any type because parent is not available in InputTextPassThroughMethodOptions
// eslint-disable-next-line @typescript-eslint/no-explicit-any
root: ({ parent }: any) => ({
className: classNames(INPUT_CLASSES, {
'order-2': parent.props.showButtons && parent.props.buttonLayout === "horizontal"
})
})
}
};
However, this still gives a TypeScript error, since parent is not available in InputTextPassThroughMethodOptions
. Is there a way to solve this?
from primereact.
Yes if you look at Accordion.d.ts it has this...
/**
* Custom passthrough(pt) option method.
*/
export interface AccordionTabPassThroughMethodOptions {
props: AccordionTabProps;
parent: AccordionPassThroughMethodOptions;
context: AccordionContext;
}
I think we just need to add parent
in the TS def.
from primereact.
@melloware Probably, yes. TS definitions are written manually in PrimeReact, right?
from primereact.
Related Issues (20)
- AutoComplete: Regression in Enter Key Selection Issue HOT 2
- Editor: Newline added (core QuillJS Issue) HOT 3
- Checkbox HOT 2
- InputNumber: can be cheated in order to enter symbols or letters HOT 15
- New component InputOtp
- Checkboxes & toggles broken HOT 7
- Multiple Components: classnames not being set in unstyled mode HOT 1
- Tailwind Style issue from version v10.x when using with reactflow HOT 15
- ButtonGroup: missing children prop HOT 1
- StepperPanel: New const instead of class components are no valid JSX.Element's HOT 9
- InputText: Typescript useRef types with new const instead of class components HOT 10
- Stepper: missing .p-component class for button.p-stepper-action HOT 3
- MeterGroup: Failed to resolve import "primereact/metergroup" from "src/App.tsx". HOT 10
- DataTable: dynamic column order did not work after manually drag/drop column for ordering.
- InputNumber: change event not triggered from browser suggestions HOT 1
- Checkbox: Upgrading to 10.6.2 with Tailwind theme breaks component HOT 1
- Password - Toggle Mask incorrect icon positioning
- Menu: Not Positioned Properly Relative to Fixed Element HOT 1
- Sidebar:Wrong components import in Headless Sidebar example HOT 1
- ButtonGroup: Typescript missing ref property definition 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.