Skip to content

feat: add textarea component and placeholders for dynamic parameters component #17466

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 4 commits into from
Apr 18, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: add placeholders for dynamic parameters
  • Loading branch information
jaaydenh committed Apr 18, 2025
commit 26c6193a7a55bb28fc8b1f549c6f148b01122d53
14 changes: 11 additions & 3 deletions site/src/modules/workspaces/DynamicParameter/DynamicParameter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ const ParameterField: FC<ParameterFieldProps> = ({
disabled={disabled}
>
<SelectTrigger>
<SelectValue placeholder="Select option" />
<SelectValue
placeholder={
(parameter.styling as { placeholder?: string })?.placeholder ||
Copy link
Contributor

@brettkolodny brettkolodny Apr 18, 2025

Choose a reason for hiding this comment

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

I see that we have this in the previous code but is there no way we can do this without the type assertion?

"Select option"
}
/>
</SelectTrigger>
<SelectContent>
{parameter.options.map((option) => (
Expand Down Expand Up @@ -219,7 +224,10 @@ const ParameterField: FC<ParameterFieldProps> = ({
onChange(JSON.stringify(values));
}}
hidePlaceholderWhenSelected
placeholder="Select option"
placeholder={
(parameter.styling as { placeholder?: string })?.placeholder ||
"Select option"
}
emptyIndicator={
<p className="text-center text-md text-content-primary">
No results found
Expand Down Expand Up @@ -338,7 +346,7 @@ const ParameterField: FC<ParameterFieldProps> = ({
onChange={(e) => onChange(e.target.value)}
disabled={disabled}
placeholder={
(parameter.styling as { placehholder?: string })?.placehholder
(parameter.styling as { placeholder?: string })?.placeholder
}
{...inputProps}
/>
Expand Down
Loading