-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add replace
prop to KRouterLink
#152
Conversation
Hey @sairina - we'll want to have the I think that since the default is |
Thanks, for the clarification @nucleogenesis! Does this now work as intended? Showing use of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
replace: { | ||
type: Boolean, | ||
required: false, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid ambiguity and undefined
input values, component props should either be required: true
or provide a default
value.
In this case, the prop should be:
replace: {
type: Boolean,
default: false,
}
This ought to be caught by a linting rule. Can follow up separately on why it wasn't:
https://eslint.vuejs.org/rules/require-default-prop.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I fixed it in a separate branch as a PR #162. Here. Not sure why that wasn't caught?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I missed that - good eye @indirectlylit !
Summary
Added
replace
prop toKRouterLink
by makingreplace
accessible within<router-link>
component.Addresses #85