ErnaneJ / svelte-star-rating

Simple Svelte component, with no dependencies, for implementing and capturing assessments through a simple and intuitive interface that will take you to the stars. ✨
https://www.npmjs.com/package/@ernane/svelte-star-rating
MIT License
36 stars 10 forks source link

Issue: #14 - Added ternary to change readOnly behavior, added on:click event #15

Closed Thiteago closed 7 months ago

Thiteago commented 7 months ago

This PR aims to adjust the input responsible for controlling the "rating" value, given that when the readOnly = true value was assigned, it would be disabled, preventing click events.

A ternary operator was created to set the minimum and maximum values of the input, where in the case of readOnly, the values will be the same as the defined score, preventing user changes.

netlify[bot] commented 7 months ago

Deploy Preview for svelte-start-rating canceled.

Name Link
Latest commit 4365748d231df9446f5b517519906ad19d1b25a0
Latest deploy log https://app.netlify.com/sites/svelte-start-rating/deploys/6610728f769d110008c19518