Fix: Clicking tags on share modal updates store immediately (#2720)
* Fix: Click tags on share modal share component to the store immediately * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
parent
8291aa9c24
commit
c4b86e9d63
1 changed files with 30 additions and 27 deletions
|
|
@ -26,8 +26,8 @@ export function TagsSelector({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HorizontalScrollFadeComponent isFolder={false}>
|
<HorizontalScrollFadeComponent isFolder={false}>
|
||||||
{!loadingTags &&
|
{!loadingTags
|
||||||
tags.map((tag, idx) => (
|
? tags.map((tag, idx) => (
|
||||||
<button
|
<button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={
|
className={
|
||||||
|
|
@ -35,7 +35,9 @@ export function TagsSelector({
|
||||||
? "cursor-not-allowed"
|
? "cursor-not-allowed"
|
||||||
: "overflow-hidden whitespace-nowrap"
|
: "overflow-hidden whitespace-nowrap"
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
updateTags(tag.name);
|
updateTags(tag.name);
|
||||||
}}
|
}}
|
||||||
key={idx}
|
key={idx}
|
||||||
|
|
@ -54,7 +56,8 @@ export function TagsSelector({
|
||||||
{tag.name}
|
{tag.name}
|
||||||
</Badge>
|
</Badge>
|
||||||
</button>
|
</button>
|
||||||
))}
|
))
|
||||||
|
: []}
|
||||||
</HorizontalScrollFadeComponent>
|
</HorizontalScrollFadeComponent>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue