From b233a4e2d60aef6ecc582a28ac6faeff7caf56df Mon Sep 17 00:00:00 2001 From: John <1719221+robokozo@users.noreply.github.com> Date: Thu, 12 Oct 2023 01:24:34 -0700 Subject: [PATCH] Fixed kebab typo (#4593) --- CHANGELOG.md | 2 +- README.md | 2 +- components/lib/utils/ObjectUtils.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bb3a093d..bb3cf2c97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1334,7 +1334,7 @@ **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 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) diff --git a/README.md b/README.md index ec225fabc..e39f8a24f 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ app.component('Button', Button); ## 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 diff --git a/components/lib/utils/ObjectUtils.js b/components/lib/utils/ObjectUtils.js index 4f95ab537..d8fe31173 100755 --- a/components/lib/utils/ObjectUtils.js +++ b/components/lib/utils/ObjectUtils.js @@ -206,8 +206,8 @@ export default { let props = vnode.props; if (props) { - let kebapProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); - let propName = Object.prototype.hasOwnProperty.call(props, kebapProp) ? kebapProp : prop; + let kebabProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); + let propName = Object.prototype.hasOwnProperty.call(props, kebabProp) ? kebabProp : prop; return vnode.type.extends.props[prop].type === Boolean && props[propName] === '' ? true : props[propName]; }