mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Pass Through options added to documentation
This commit is contained in:
parent
eca735c8c8
commit
d474f11d35
3 changed files with 33 additions and 7 deletions
|
@ -2,14 +2,24 @@ import APIDocs from '@/doc/common/apidoc/index.json';
|
|||
|
||||
export const getPTOption = (name) => {
|
||||
const { props } = APIDocs[name.toLowerCase()].interfaces.values[`${name}PassThroughOptions`] || APIDocs[name.toLowerCase()].interfaces.values[`${name}DirectivePassThroughOptions`];
|
||||
const options = APIDocs[name.toLowerCase()].interfaces.values[`${name}PassThroughMethodOptions`];
|
||||
let data = [];
|
||||
|
||||
for (const [i, prop] of props.entries()) {
|
||||
data.push({
|
||||
value: i + 1,
|
||||
label: prop.name,
|
||||
description: prop.description
|
||||
});
|
||||
if (options) {
|
||||
data.push({
|
||||
value: i + 1,
|
||||
label: prop.name,
|
||||
options: options?.props,
|
||||
description: prop.description
|
||||
});
|
||||
} else {
|
||||
data.push({
|
||||
value: i + 1,
|
||||
label: prop.name,
|
||||
description: prop.description
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue