Clicking component reloads a page

I have created a component that imitates the behaviour of a Trust Score rating meter on Trustpilot (example - stars in the beginning of the form). But my published component reloads a page when selected while it should only change state to selected. It has a trustScore state variable defined that a user changes. You can see the behaviour in the video attached.

What am I doing wrong? Why the page is reloading?

Ok. I’ve sorted it out. The clickable tiles of the component had a button tag assigned, so I had to add a HTML Attribute type and set it to button.

1 Like