Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/MultiSelectCombobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export const MultiSelectCombobox = ({

const comboboxRef = useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down
4 changes: 3 additions & 1 deletion src/components/RowLinksWithDropdown/OtherLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export function OtherLinks({ options, name, isActive, className }: IProps) {
const [viewableMatches, setViewableMatches] = useState(20)
const comboboxRef = useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down
10 changes: 8 additions & 2 deletions src/components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export function Select({

const selectRef = React.useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down Expand Up @@ -104,7 +106,11 @@ export function Select({
setValueOnClick={false}
hideOnClick={false}
className="w-full cursor-pointer px-3 py-4 text-(--link) hover:bg-(--link-hover-bg) focus-visible:bg-(--link-hover-bg) data-active-item:bg-(--link-hover-bg)"
onClick={() => setViewableMatches((prev) => prev + 20)}
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
setViewableMatches((prev) => prev + 20)
}}
>
See more...
</Ariakit.SelectItem>
Expand Down
10 changes: 8 additions & 2 deletions src/components/SelectWithCombobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export function SelectWithCombobox({

const comboboxRef = React.useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down Expand Up @@ -140,7 +142,11 @@ export function SelectWithCombobox({
setValueOnClick={false}
hideOnClick={false}
className="w-full cursor-pointer px-3 py-4 text-(--link) hover:bg-(--link-hover-bg) focus-visible:bg-(--link-hover-bg) data-active-item:bg-(--link-hover-bg)"
onClick={() => setViewableMatches((prev) => prev + 20)}
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
setViewableMatches((prev) => prev + 20)
}}
>
See more...
</Ariakit.SelectItem>
Expand Down
4 changes: 3 additions & 1 deletion src/containers/Bridges/BridgeChainSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export function BridgeChainSelector({ options, currentChain, handleClick }: IPro

const comboboxRef = React.useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down
4 changes: 3 additions & 1 deletion src/containers/Raises/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export function RaisesSearch({ list }) {

const comboboxRef = useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down
8 changes: 6 additions & 2 deletions src/containers/Yields/Filters/IncludeExcludeTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export function IncludeExcludeTokens({
const tokensComboboxRef = useRef<HTMLDivElement>(null)
const pairsComboboxRef = useRef<HTMLDivElement>(null)

const handleTokensSeeMore = () => {
const handleTokensSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = tokensViewableMatches
setTokensViewableMatches((prev) => prev + 20)

Expand All @@ -103,7 +105,9 @@ export function IncludeExcludeTokens({
}, 0)
}

const handlePairsSeeMore = () => {
const handlePairsSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = pairsViewableMatches
setPairsViewableMatches((prev) => prev + 20)

Expand Down
4 changes: 3 additions & 1 deletion src/containers/Yields/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export function YieldsSearch({

const comboboxRef = React.useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down
4 changes: 3 additions & 1 deletion src/pages/borrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ const TokensSelect = ({

const comboboxRef = React.useRef<HTMLDivElement>(null)

const handleSeeMore = () => {
const handleSeeMore = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
const previousCount = viewableMatches
setViewableMatches((prev) => prev + 20)

Expand Down
Loading