Closed Ashima-Arora closed 1 week ago
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | 366f5ca17008caca57bbde017fe412380a1c7460 |
You are on the right track here. I think lines 179-189 that gets the values in the correct format should live in the convertValue
function, but it looks like you have a couple of console statements there and plan to move that when you use the dynamic values.
The only question I have is why do we need to add the name
attribute? Can we just use the id
since as far as I know the id and name would be the same in all cases?
Hi @micahmills,
we have made changes in the code so that we can integrate dt-button for favorite button in to theme. Related changes are done in dt-button, componentService and apiService. Kindly look once and provide us with your feedback. Thank you!
@Vijenderrr
@micahmills
Could you please review the code changed in dt-button component and the related code changes in componentService.
We started with modifying the dt-button to handle the click event and added a 'name' attribute to the component. Subsequently, we utilized ComponentService to trigger the API and save the necessary values.
The custom 'click' event is now managed within the ComponentService. For the initial setup, we've used static values required by the API to ensure the functionality works as intended.
Here is how I have integrated dt-button for 'following' button in dt-theme
"We have used static values for now to setup the functionality first. We will dynamic all the values once approach is fixed"
Kindly share your thoughts as going forward, we would be integrating
dt-button
everywhere and many times we need to hit api and send the api expected values.Thank you!
@gp-birender @Vijenderrr