Skip to content

feat: create dynamic parameter component #17351

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

Merged
merged 13 commits into from
Apr 16, 2025
3 changes: 3 additions & 0 deletions site/src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import * as React from "react";

import { cn } from "utils/cn";

/**
* To allow for an indeterminate state the checkbox must be controlled, otherwise the checked prop would remain undefined
*/
export const Checkbox = React.forwardRef<
React.ElementRef<typeof CheckboxPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const meta: Meta<typeof MultiSelectCombobox> = {
All organizations selected
</p>
),
defaultOptions: organizations.map((org) => ({
options: organizations.map((org) => ({
label: org.display_name,
value: org.id,
})),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@ export const MultiSelectCombobox = forwardRef<
const [open, setOpen] = useState(false);
const [onScrollbar, setOnScrollbar] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const dropdownRef = useRef<HTMLDivElement>(null); // Added this
const dropdownRef = useRef<HTMLDivElement>(null);

const [selected, setSelected] = useState<Option[]>(value || []);
const [selected, setSelected] = useState<Option[]>(
arrayDefaultOptions ?? [],
);
const [options, setOptions] = useState<GroupOption>(
transitionToGroupOption(arrayDefaultOptions, groupBy),
);
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/RadioGroup/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const RadioGroupItem = React.forwardRef<
focus:outline-none focus-visible:ring-2 focus-visible:ring-content-link
focus-visible:ring-offset-4 focus-visible:ring-offset-surface-primary
disabled:cursor-not-allowed disabled:opacity-25 disabled:border-surface-invert-primary
hover:border-border-hover`,
hover:border-border-hover data-[state=checked]:border-border-hover`,
className,
)}
{...props}
Expand Down
Loading
Loading