-
Notifications
You must be signed in to change notification settings - Fork 122
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
Improve performance of settings dialog: remove connect statement from… #518
Improve performance of settings dialog: remove connect statement from… #518
Conversation
… connect method + Split SettingDialogStore components + bug fix: updates object incorrect with 'numbercolorpicker' form type
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.
All Look good, just a one suggestion
src/store/StudyLegendStore.js
Outdated
for (const { id, category, value, type } of items) { | ||
if (type === 'numbercolorpicker' | ||
? (study[category][`${id}Color`] !== value.Color | ||
|| study[category][`${id}Value`] !== value.Value) |
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.
@brucebinary these two much inline conditions, doesn't it confusing?
isChanged = study[category][id] !== value; | ||
} | ||
|
||
if (isChanged) { |
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.
@shayanbinary this better?
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.
yeah much better 👍
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
isChanged = study[category][id] !== value; | ||
} | ||
|
||
if (isChanged) { |
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.
yeah much better 👍
… connect method