Skip to content

Commit

Permalink
Fixed kebab typo (#4593)
Browse files Browse the repository at this point in the history
  • Loading branch information
robokozo authored Oct 12, 2023
1 parent 86c301f commit b233a4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<Dialog :showHeader="false"></Dialog>
Expand Down
4 changes: 2 additions & 2 deletions components/lib/utils/ObjectUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit b233a4e

Please sign in to comment.