-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature InputValues #38
Conversation
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
} | ||
|
||
return ( | ||
<div> |
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.
empty div, is this desired?
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.
I will come back to the layout later
react/components/ProductAssemblyOptions/ProductAssemblyOptionItemInputValues.tsx
Outdated
Show resolved
Hide resolved
[inputValueLabel]: inputValue, | ||
} | ||
|
||
return { ...state } |
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.
I did not understand where did you actually mutate your state here
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.
groupState
is a ref to a property in the state.
Like: state = {a:{b:{c:1}}}; let b = state.a.b; b = {c:2}; console.log(state); //state={a:{b:{c:2}}}
Can you see how we are mutating the state, after all?
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.
Oooh! I see! Makes sense hahahah
Thanks! =D
} | ||
|
||
return ( | ||
<div> |
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.
Is this wrapper <div>
necessary?
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.
I will come back to the layout later and change those divs
react/components/ProductAssemblyOptions/InputValue/OptionsInputValue.tsx
Show resolved
Hide resolved
react/typings/ItemMetadata.d.ts
Outdated
type InputValue = TextInputValue | BooleanInputValue | OptionsInputValue | ||
|
||
interface TextInputValue { | ||
type: 'TEXT'|string |
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.
Why do you need to define type
as being 'TEXT' | string
, and not just 'TEXT'
? Other string values would be ok?
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.
Changed
Beep boop 🤖 That's ok, I created an issue for this so we don't forget |
This PR implements InputValues, previously called Attachments.
Linked workspace:
https://breno--storecomponents.myvtex.com/star-color-top/p
Depends on: