Skip to content

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Apr 23, 2025

This adds a red asterisk next to a parameter name if it is required and marks passes the parameter required value to input and textarea form controls.

The multi-select combobox needs additional work (in a separate PR) so that it can handle the required prop correctly for form submit.

Screenshot 2025-04-24 at 00 02 10

@jaaydenh jaaydenh self-assigned this Apr 23, 2025
@@ -95,8 +95,12 @@ const ParameterLabel: FC<ParameterLabelProps> = ({ parameter, isPreset }) => {

<div className="flex flex-col w-full gap-1">
<Label className="flex gap-2 flex-wrap text-sm font-medium">
{displayName}

<span className="flex">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, I decided to add the required asterisk for all parameters even though it really doesn't make sense for (checkbox, slider, radio, switch) since all parameters have the required prop.

@jaaydenh jaaydenh requested a review from aslilac April 23, 2025 23:02
@jaaydenh jaaydenh merged commit e562e3c into main Apr 24, 2025
29 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/dynamic-params-required-fields branch April 24, 2025 21:14
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
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