-
Notifications
You must be signed in to change notification settings - Fork 31
chore: add coffee-warehouse example #164
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
Conversation
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.
great job!
methods: { | ||
setSelectedState(id, theme) { | ||
if (id === 1) { | ||
this.teamClass = theme + " k-state-selected"; |
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.
such code is quite often a 'code smell' - one thing that comes to my mind is to check in the computed property what is the selectedMenuItem and add the selected class depending on it there.
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.
In commit 1435fc6 the logic is simplified to call the updateSelectedMenuItem method when two watchers are changed. Using computed properties throws an unusual error' Write operation failed: computed property is read only.' I think it appears because the values of these computed properties are used in the items computed property.
No description provided.