Skip to content
Merged
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 @@ -24,6 +24,7 @@ import {
} from "components/Select/Select";
import { Slider } from "components/Slider/Slider";
import { Switch } from "components/Switch/Switch";
import { Textarea } from "components/Textarea/Textarea";
import {
Tooltip,
TooltipContent,
Expand Down Expand Up @@ -175,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 @@ -218,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 @@ -301,6 +310,18 @@ const ParameterField: FC<ParameterFieldProps> = ({
/>
);

case "textarea":
return (
<Textarea
defaultValue={defaultValue}
onChange={(e) => onChange(e.target.value)}
disabled={disabled}
placeholder={
(parameter.styling as { placeholder?: string })?.placeholder
}
/>
);

case "input": {
const inputType = parameter.type === "number" ? "number" : "text";
const inputProps: Record<string, unknown> = {};
Expand All @@ -325,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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy