Skip to content

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

Merged
merged 14 commits into from
Nov 5, 2021
Merged

chore: add coffee-warehouse example #164

merged 14 commits into from
Nov 5, 2021

Conversation

PekoPPT
Copy link
Contributor

@PekoPPT PekoPPT commented Nov 2, 2021

No description provided.

@PekoPPT PekoPPT added the Demo label Nov 2, 2021
@PekoPPT PekoPPT requested a review from zdravkov November 2, 2021 13:18
@PekoPPT PekoPPT self-assigned this Nov 2, 2021
Copy link
Member

@zdravkov zdravkov left a 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";
Copy link
Member

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.

Copy link
Contributor Author

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.

@zdravkov zdravkov self-requested a review November 5, 2021 10:26
@zdravkov zdravkov merged commit f118c59 into master Nov 5, 2021
@PekoPPT PekoPPT deleted the coffee-warehouse branch February 8, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants