Fixed kebab typo (#4593)

pull/4600/head
John 2023-10-12 01:24:34 -07:00 committed by GitHub
parent 86c301f095
commit b233a4e2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -1334,7 +1334,7 @@
**Implemented New Features and Enhancements:** **Implemented New Features and Enhancements:**
- Kebap-case is not supported in some components like DataTable [\#1263](https://github.com/primefaces/primevue/issues/1263) - Kebab-case is not supported in some components like DataTable [\#1263](https://github.com/primefaces/primevue/issues/1263)
- Improve sorting performance on DataTable [\#1633](https://github.com/primefaces/primevue/issues/1633) - Improve sorting performance on DataTable [\#1633](https://github.com/primefaces/primevue/issues/1633)
- Improve accessibility on Editable DataTable [\#1632](https://github.com/primefaces/primevue/issues/1632) - Improve accessibility on Editable DataTable [\#1632](https://github.com/primefaces/primevue/issues/1632)
- Add type definition for Utils modules [\#1622](https://github.com/primefaces/primevue/issues/1622) - Add type definition for Utils modules [\#1622](https://github.com/primefaces/primevue/issues/1622)

View File

@ -71,7 +71,7 @@ app.component('Button', Button);
## Prop Cases ## Prop Cases
Component prop names are described as camel case throughout the documentation however kebap-case is also fully supported. Events on the other hand should always be kebap-case. Component prop names are described as camel case throughout the documentation however kebab-case is also fully supported. Events on the other hand should always be kebab-case.
```vue ```vue
<Dialog :showHeader="false"></Dialog> <Dialog :showHeader="false"></Dialog>

View File

@ -206,8 +206,8 @@ export default {
let props = vnode.props; let props = vnode.props;
if (props) { if (props) {
let kebapProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); let kebabProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
let propName = Object.prototype.hasOwnProperty.call(props, kebapProp) ? kebapProp : prop; let propName = Object.prototype.hasOwnProperty.call(props, kebabProp) ? kebabProp : prop;
return vnode.type.extends.props[prop].type === Boolean && props[propName] === '' ? true : props[propName]; return vnode.type.extends.props[prop].type === Boolean && props[propName] === '' ? true : props[propName];
} }