Skip to content

Commit

Permalink
chore: add comments for overwrites
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Jul 5, 2024
1 parent 6abdad7 commit 5031097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/components/scripts/post-build/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ export default (tmp?: boolean) => {
component?.config?.react?.propsPassingFilter ?? []
)})}`
},
/* We need to overwrite the internal state._value property just for react to have controlled components.
* It works for Angular & Vue, so we overwrite it only for React. */
{
from: 'props.value ?? _value',
to: 'props.value'
Expand Down
1 change: 1 addition & 0 deletions packages/components/scripts/post-build/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default (tmp?: boolean) => {
from: /immediate: true,/g,
to: 'immediate: true,\nflush: "post"'
},
/* `this` can be undefined for ssr (nuxt) we need to add */
{
from: /this.\$refs.ref\?.validationMessage/g,
to: 'this?.$refs.ref?.validationMessage'
Expand Down

0 comments on commit 5031097

Please sign in to comment.