You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I've noticed that the component doesn't update when the parent passes new values for the planSource and planQuery props. The parsing and initialization logic is executed inside the onBeforeMount hook, which only runs once during the component’s lifecycle. This means that even if the parent updates these props later, the component's internal state (like queryText) is not re-computed.
Is the current behavior (processing props only on mount) intentional? If not, I'll work on a PR that makes the component reactive to prop changes.
To Reproduce
Render the component with initial props for planSource and planQuery.
Update these props from the parent component.
Observe that the component does not re-render or re-parse the new values.
Expected behavior
The component should be reactive to changes in planSource and planQuery.
Current Workaround
At the moment, the only way to force the component to re-render with new prop values is by passing a different key from the parent component. This forces a remount of the component, triggering the initialization logic again.
Description
I've noticed that the component doesn't update when the parent passes new values for the
planSource
andplanQuery
props. The parsing and initialization logic is executed inside theonBeforeMount
hook, which only runs once during the component’s lifecycle. This means that even if the parent updates these props later, the component's internal state (likequeryText
) is not re-computed.Is the current behavior (processing props only on mount) intentional? If not, I'll work on a PR that makes the component reactive to prop changes.
To Reproduce
Expected behavior
The component should be reactive to changes in
planSource
andplanQuery
.Current Workaround
At the moment, the only way to force the component to re-render with new prop values is by passing a different key from the parent component. This forces a remount of the component, triggering the initialization logic again.
Example: https://github.com/commandprompt/pgmanage/blob/master/pgmanage/app/static/pgmanage_frontend/src/components/ExplainTabContent.vue
The text was updated successfully, but these errors were encountered: