-
Notifications
You must be signed in to change notification settings - Fork 124
perf: updateValue #4721
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
perf: updateValue #4721
Conversation
tab: 'Basic' | ||
} | ||
} | ||
}, | ||
mfa_level: { | ||
width: '130px', | ||
formatter: (row) => { |
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.
The code is missing a file path after Vue.createInstance
, such as "./App.vue"
. Additionally, there seems to be some syntax errors including an incorrect closing parenthesis on line 49 of the second component's function signature. These issues require minor adjustments; they don't seem to cause significant problems but will help improve readability and maintainability.
drawer: true, | ||
routeQuery: { | ||
tab: 'Basic' | ||
} | ||
} | ||
}, | ||
action: { |
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.
There is no indication of any irregularities, potential issues, or optimization suggestions in the provided code changes. The import statements are correct and there does not seem to be any syntax errors or discrepancies that need attention.
However, you should ensure that Vue component names (AmountFormatter
instead of AmountFormatter.vue
, and similar inconsistencies) remain consistent across all modules for easier maintenance and maintain standard naming conventions.
Regarding the use of the Drawer feature in the <detail>
tag based on the given configuration options, this depends upon whether it was intended specifically as part of the search page configurations, which appears to be inconsistent with the other pages mentioned (like /users/assets
) since it's more common to expect this to appear only in user assets sections like /assets
. If it is included just for consistency within each module, then it might serve its purpose. However, unless further context suggests otherwise, I would suggest removing the extra level of depth and focusing solely on updating the relevant components accordingly to improve clarity and consistency between different parts of your application.
this.value = { ...this.value, [id]: value } | ||
this.$nextTick(() => { | ||
this.$refs.elForm.validateField(id) | ||
}) | ||
}, | ||
/** | ||
* @return {object} key is item's id, value is item's 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.
The provided code snippet seems to be a part of an implementation for updating form values in a given state and also validating the data entered through the form elements using Vue.js.
There don't appear to be any errors detected that would indicate a specific issue with regularities or optimizations. However, some minor improvements could include ensuring there is proper sanitization or validation being done on incoming values before they are assigned to state variables, especially since it's mentioned that we should not allow empty strings (or other nullish types) as valid inputs (if (!value)
).
Additionally, including a useRef
method might make sense if you expect the same reference variable to remain around over multiple calls to updateValue
, which is what looks like its happening here via this.$refs.elForm.validateField(id);
.
If you need further insights or have specific aspects of interest covered more precisely, feel free to specify!
|
Fixed: User Detail
perf: updateValue