[bugfix/feature]: Improve ratings (#332)

* [bugfix/feature]: Improve ratings

Fix: add preventDefault/stopPropagation to prevent scrolling to top in queue
Feat: instead of double click for clear, click on same value
This commit is contained in:
Kendall Garner 2023-10-29 03:00:01 +00:00 committed by GitHub
parent e5564c2ac2
commit 4ec981df83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 79 deletions

View file

@ -710,7 +710,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
<Rating
readOnly
value={0}
onClick={() => {}}
/>
),
onClick: () => handleUpdateRating(0),
@ -721,7 +720,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
<Rating
readOnly
value={1}
onClick={() => {}}
/>
),
onClick: () => handleUpdateRating(1),
@ -732,7 +730,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
<Rating
readOnly
value={2}
onClick={() => {}}
/>
),
onClick: () => handleUpdateRating(2),
@ -743,7 +740,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
<Rating
readOnly
value={3}
onClick={() => {}}
/>
),
onClick: () => handleUpdateRating(3),
@ -754,7 +750,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
<Rating
readOnly
value={4}
onClick={() => {}}
/>
),
onClick: () => handleUpdateRating(4),
@ -765,7 +760,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
<Rating
readOnly
value={5}
onClick={() => {}}
/>
),
onClick: () => handleUpdateRating(5),