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

fixed filters behaviour when apply and magic link text #50

Merged
merged 1 commit into from
Nov 9, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export function AddConnectionTabContent({
return (
<div className="flex flex-col gap-2 p-4">
<div>
<p className="text-base font-semibold">Setup a new Connection</p>
<p className="text-base">Choose a connector config to start</p>
<p className="text-sm">
Choose a connector to integrate with your current setup.
</p>
</div>
<ConnectIntegrations
connectorConfigFilters={connectorConfigFilters}
Expand Down
14 changes: 7 additions & 7 deletions packages/ui/components/CheckboxFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function CheckboxFilter({
{} as Record<string, boolean>,
),
)
const [isOpen, setIsOpen] = useState(false)

// Handle checkbox change
const handleCheckboxChange = (id: string) => {
Expand All @@ -31,9 +32,9 @@ export function CheckboxFilter({
}

return (
<Popover>
<Popover open={isOpen} onOpenChange={setIsOpen}>
<PopoverTrigger asChild>
<Button variant="secondary">
<Button variant="secondary" onClick={() => setIsOpen(true)}>
<Component className="h-4 w-4" style={{color: '#8A5DF6'}} />{' '}
<span className="ml-2">Category</span>
</Button>
Expand All @@ -43,9 +44,7 @@ export function CheckboxFilter({
{options.map((option) => (
<div
key={option}
className="flex w-full cursor-pointer items-center justify-start space-x-2"
// onClick={() => handleCheckboxChange(option)}
>
className="flex w-full cursor-pointer items-center justify-start space-x-2">
<Checkbox
id={option}
checked={checkedState[option]}
Expand Down Expand Up @@ -106,11 +105,12 @@ export function CheckboxFilter({
Clear
</Button>
<Button
onClick={() =>
onClick={() => {
onApply(
Object.keys(checkedState).filter((key) => checkedState[key]),
)
}
setIsOpen(false)
}}
size="sm">
Apply
</Button>
Expand Down
Loading