Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow selecting multiple tags #482

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

nekrich
Copy link

@nekrich nekrich commented Sep 12, 2024

Allow selecting multiple tags. AND logic. Blip must contain all selected tags to be shown.

Related issue: #464.

  • The old tag= query parameter is still supported for backward compatibility.

@@ -14,13 +15,49 @@ type TagProps = {
} & Omit<LinkProps, "href"> &
ComponentPropsWithoutRef<"a">;

function QueryString(tag: string, isActive: boolean | undefined) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review:
I could find a quick way to convert router.query to URLSearchParams and had to write the QueryString function.
I've tried new URLSearchParams(router.query as Record<string, string>),. It converts arrays to coma-separated strings, and I lose query parameters type-safety when working with string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant