fix bug with remove button in search
This commit is contained in:
parent
8866b6bca6
commit
ce8142cdbe
3 changed files with 1 additions and 5 deletions
|
@ -45,8 +45,8 @@ export function Item({ item, itemNameId, outfitState, dispatchToOutfit }) {
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="gray.400"
|
color="gray.400"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
|
||||||
dispatchToOutfit({ type: "removeItem", itemId: item.id });
|
dispatchToOutfit({ type: "removeItem", itemId: item.id });
|
||||||
|
e.preventDefault();
|
||||||
}}
|
}}
|
||||||
opacity="0"
|
opacity="0"
|
||||||
transitionProperty="opacity color"
|
transitionProperty="opacity color"
|
||||||
|
|
|
@ -196,7 +196,6 @@ function SearchResults({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(firstSearchResultRef);
|
|
||||||
return (
|
return (
|
||||||
<ScrollTracker threshold={300} onScrolledToBottom={onScrolledToBottom}>
|
<ScrollTracker threshold={300} onScrolledToBottom={onScrolledToBottom}>
|
||||||
<ItemListContainer>
|
<ItemListContainer>
|
||||||
|
@ -211,7 +210,6 @@ function SearchResults({
|
||||||
ref={index === 0 ? firstSearchResultRef : null}
|
ref={index === 0 ? firstSearchResultRef : null}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
console.log(e.key);
|
|
||||||
if (e.key === "ArrowUp") {
|
if (e.key === "ArrowUp") {
|
||||||
goToPrevItem(e);
|
goToPrevItem(e);
|
||||||
} else if (e.key === "ArrowDown") {
|
} else if (e.key === "ArrowDown") {
|
||||||
|
|
|
@ -74,7 +74,6 @@ function SpeciesColorPicker({
|
||||||
if (allValidSpeciesColorPairs.has(pair)) {
|
if (allValidSpeciesColorPairs.has(pair)) {
|
||||||
dispatchToOutfit({ type: "changeColor", colorId: e.target.value });
|
dispatchToOutfit({ type: "changeColor", colorId: e.target.value });
|
||||||
} else {
|
} else {
|
||||||
console.log(pair, Array.from(allValidSpeciesColorPairs));
|
|
||||||
const species = allSpecies.find((s) => s.id === speciesId);
|
const species = allSpecies.find((s) => s.id === speciesId);
|
||||||
const color = allColors.find((c) => c.id === colorId);
|
const color = allColors.find((c) => c.id === colorId);
|
||||||
toast({
|
toast({
|
||||||
|
@ -91,7 +90,6 @@ function SpeciesColorPicker({
|
||||||
if (allValidSpeciesColorPairs.has(pair)) {
|
if (allValidSpeciesColorPairs.has(pair)) {
|
||||||
dispatchToOutfit({ type: "changeSpecies", speciesId: e.target.value });
|
dispatchToOutfit({ type: "changeSpecies", speciesId: e.target.value });
|
||||||
} else {
|
} else {
|
||||||
console.log(pair, Array.from(allValidSpeciesColorPairs));
|
|
||||||
const species = allSpecies.find((s) => s.id === speciesId);
|
const species = allSpecies.find((s) => s.id === speciesId);
|
||||||
const color = allColors.find((c) => c.id === colorId);
|
const color = allColors.find((c) => c.id === colorId);
|
||||||
toast({
|
toast({
|
||||||
|
|
Loading…
Reference in a new issue