Closed annaarun123 closed 6 years ago
Hi,
Stars are clickable (and causing a page reload in my case) even if the editing prop is false. Is there a way to make stars non-clickable. I tried passing onStarClick={() => {}} It still didn't work.
My code:
import StarRatingComponent from 'react-star-rating-component'; export const renderStars = (rating, styles) => { return (<StarRatingComponent name="ratingStar" starCount={5} value={rating} editing={false} starColor='#FFFFFF' emptyStarColor='#ea9a00' className={styles.ratingStars} onStarClick={() => {}} renderStarIcon={(index, value) => { return (<div className={styles.starOrange}> <i className={index <= value ? `fa fa-star ${styles.fullStarWhite}` : `fa fa-star-o ${styles.emptyStarOrange}`} /> </div>); }} renderStarIconHalf={() => <div className={styles.starOrange}> <i className={"fa fa-star-half-full"} /> </div>} />); };
Thanks
hey, you can try 1.4.0
1.4.0
Hi,
Stars are clickable (and causing a page reload in my case) even if the editing prop is false. Is there a way to make stars non-clickable. I tried passing onStarClick={() => {}} It still didn't work.
My code:
Thanks