-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: removed err as a default value for schema type and enum variants #426
Conversation
let schema_type_s = Signal::derive(move || { | ||
SchemaType::try_from(config_schema_rs.get()) | ||
.map_err(|err| format!("Failed to get schema type: {}", err)) | ||
}); | ||
let enum_variants_s = Signal::derive(move || { | ||
EnumVariants::try_from(config_schema_rs.get()) | ||
.map_err(|err| format!("Failed to get enum variants: {}", err)) | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So these signals are read-only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
1b7dd87
to
c89ddac
Compare
if schema_type.is_err() || enum_variants.is_err() { | ||
let tooltip_txt = if config_schema_rs.get().is_null() { | ||
"Please select a schema type".to_string() | ||
} else { | ||
schema_type_s.get().unwrap_err() | ||
}; | ||
return view! { | ||
<div class="form-control"> | ||
<label class="label"> | ||
<span class="label-text">Default Value</span> | ||
</label> | ||
<div class="tooltip text-left w-full max-w-md" data-tip=tooltip_txt> | ||
<textarea | ||
type="text" | ||
placeholder="Value" | ||
class="input input-bordered w-full pt-3" | ||
disabled=true | ||
> | ||
{config_value_rs.get().html_display()} | ||
</textarea> | ||
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rendering a disabled field until SchemaType is figured out for the default config.
Problem
Describe the problem you are trying to solve here
Solution
Provide a brief summary of your solution so that reviewers can understand your code
Environment variable changes
What ENVs need to be added or changed
Pre-deployment activity
Things needed to be done before deploying this change (if any)
Post-deployment activity
Things needed to be done after deploying this change (if any)
API changes
Possible Issues in the future
Describe any possible issues that could occur because of this change