fix(input): replace bind:value with explicit prop/event binding#19
Closed
DarcyJason wants to merge 1 commit intorust-ui:mainfrom
Closed
fix(input): replace bind:value with explicit prop/event binding#19DarcyJason wants to merge 1 commit intorust-ui:mainfrom
DarcyJason wants to merge 1 commit intorust-ui:mainfrom
Conversation
Replaces `bind:value` with `prop:value` + `on:input` to fix an error in certain Leptos versions v0.8.17
Contributor
|
Hey @DarcyJason, thanks for the PR! 🙏 After looking into this more, the root issue is that Closing this in favour of that fix — but thanks for the report, it's what led us to add the check! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
bind:valuewithprop:value+on:inputto fix an error in certain Leptos versions v0.8.17error[E0599]: the method
bindexists for structHtmlElement<Input, ..., ()>, but its trait bounds were not satisfied--> src/components/ui/input.rs:67:25
|
67 | Some(signal) => view! {
| ________________^
68 | | <input
69 | | data-name="Input"
70 | | type=type_str
... |
85 | | />
86 | | }
| |^
|
::: /Users/notnone/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/reactive_graph-0.2.13/src/wrappers.rs:452:5
|
452 | pub struct Signal<T, S = SyncStorage>
| ------------------------------------- doesn't satisfy
leptos::prelude::Signal<BoolOrT<_>>: IntoProperty|
::: /Users/notnone/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tachys-0.2.14/src/html/element/mod.rs:37:1
|
37 | pub struct HtmlElement<E, At, Ch> {
| --------------------------------- doesn't satisfy
_: BindAttribute<_, _, _>|
= note: the following trait bounds were not satisfied:
leptos::prelude::Signal<BoolOrT<_>>: IntoPropertywhich is required by
leptos::html::HtmlElement<Input, (Class<std::string::String>, CustomAttr<&str, &str>, Attr<leptos::attr::Type, &str>, Attr<Placeholder, std::option::Option<std::string::String>>, Attr<leptos::attr::Name, std::option::Option<std::string::String>>, Attr<Id, std::option::Option<std::string::String>>, Attr<leptos::attr::Title, std::option::Option<std::string::String>>, Attr<leptos::attr::Disabled, bool>, Attr<Readonly, bool>, Attr<Required, bool>, Attr<Autofocus, bool>, Attr<Min, std::option::Option<std::string::String>>, Attr<Max, std::option::Option<std::string::String>>, Attr<leptos::attr::Step, std::option::Option<std::string::String>>), ()>: leptos::prelude::BindAttribute<_, _, _>&leptos::html::HtmlElement<Input, (Class<std::string::String>, CustomAttr<&str, &str>, Attr<leptos::attr::Type, &str>, Attr<Placeholder, std::option::Option<std::string::String>>, Attr<leptos::attr::Name, std::option::Option<std::string::String>>, Attr<Id, std::option::Option<std::string::String>>, Attr<leptos::attr::Title, std::option::Option<std::string::String>>, Attr<leptos::attr::Disabled, bool>, Attr<Readonly, bool>, Attr<Required, bool>, Attr<Autofocus, bool>, Attr<Min, std::option::Option<std::string::String>>, Attr<Max, std::option::Option<std::string::String>>, Attr<leptos::attr::Step, std::option::Option<std::string::String>>), ()>: AddAnyAttrwhich is required by
&leptos::html::HtmlElement<Input, (Class<std::string::String>, CustomAttr<&str, &str>, Attr<leptos::attr::Type, &str>, Attr<Placeholder, std::option::Option<std::string::String>>, Attr<leptos::attr::Name, std::option::Option<std::string::String>>, Attr<Id, std::option::Option<std::string::String>>, Attr<leptos::attr::Title, std::option::Option<std::string::String>>, Attr<leptos::attr::Disabled, bool>, Attr<Readonly, bool>, Attr<Required, bool>, Attr<Autofocus, bool>, Attr<Min, std::option::Option<std::string::String>>, Attr<Max, std::option::Option<std::string::String>>, Attr<leptos::attr::Step, std::option::Option<std::string::String>>), ()>: leptos::prelude::BindAttribute<_, _, _>leptos::prelude::Signal<BoolOrT<_>>: IntoPropertywhich is required by
&leptos::html::HtmlElement<Input, (Class<std::string::String>, CustomAttr<&str, &str>, Attr<leptos::attr::Type, &str>, Attr<Placeholder, std::option::Option<std::string::String>>, Attr<leptos::attr::Name, std::option::Option<std::string::String>>, Attr<Id, std::option::Option<std::string::String>>, Attr<leptos::attr::Title, std::option::Option<std::string::String>>, Attr<leptos::attr::Disabled, bool>, Attr<Readonly, bool>, Attr<Required, bool>, Attr<Autofocus, bool>, Attr<Min, std::option::Option<std::string::String>>, Attr<Max, std::option::Option<std::string::String>>, Attr<leptos::attr::Step, std::option::Option<std::string::String>>), ()>: leptos::prelude::BindAttribute<_, _, _>&mut leptos::html::HtmlElement<Input, (Class<std::string::String>, CustomAttr<&str, &str>, Attr<leptos::attr::Type, &str>, Attr<Placeholder, std::option::Option<std::string::String>>, Attr<leptos::attr::Name, std::option::Option<std::string::String>>, Attr<Id, std::option::Option<std::string::String>>, Attr<leptos::attr::Title, std::option::Option<std::string::String>>, Attr<leptos::attr::Disabled, bool>, Attr<Readonly, bool>, Attr<Required, bool>, Attr<Autofocus, bool>, Attr<Min, std::option::Option<std::string::String>>, Attr<Max, std::option::Option<std::string::String>>, Attr<leptos::attr::Step, std::option::Option<std::string::String>>), ()>: AddAnyAttrwhich is required by
&mut leptos::html::HtmlElement<Input, (Class<std::string::String>, CustomAttr<&str, &str>, Attr<leptos::attr::Type, &str>, Attr<Placeholder, std::option::Option<std::string::String>>, Attr<leptos::attr::Name, std::option::Option<std::string::String>>, Attr<Id, std::option::Option<std::string::String>>, Attr<leptos::attr::Title, std::option::Option<std::string::String>>, Attr<leptos::attr::Disabled, bool>, Attr<Readonly, bool>, Attr<Required, bool>, Attr<Autofocus, bool>, Attr<Min, std::option::Option<std::string::String>>, Attr<Max, std::option::Option<std::string::String>>, Attr<leptos::attr::Step, std::option::Option<std::string::String>>), ()>: leptos::prelude::BindAttribute<_, _, _>leptos::prelude::Signal<BoolOrT<_>>: IntoPropertywhich is required by
&mut leptos::html::HtmlElement<Input, (Class<std::string::String>, CustomAttr<&str, &str>, Attr<leptos::attr::Type, &str>, Attr<Placeholder, std::option::Option<std::string::String>>, Attr<leptos::attr::Name, std::option::Option<std::string::String>>, Attr<Id, std::option::Option<std::string::String>>, Attr<leptos::attr::Title, std::option::Option<std::string::String>>, Attr<leptos::attr::Disabled, bool>, Attr<Readonly, bool>, Attr<Required, bool>, Attr<Autofocus, bool>, Attr<Min, std::option::Option<std::string::String>>, Attr<Max, std::option::Option<std::string::String>>, Attr<leptos::attr::Step, std::option::Option<std::string::String>>), ()>: leptos::prelude::BindAttribute<_, _, _>= note: the full name for the type has been written to '/Users/notnone/Desktop/WebAuthSystem/frontend/target/debug/deps/frontend-f3984d5efc5eea6e.long-type-4126408506728941292.txt'
= note: consider using
--verboseto print the full type name to the console= note: this error originates in the macro
view(in Nightly builds, run with -Z macro-backtrace for more info)For more information about this error, try
rustc --explain E0599.error: could not compile
frontend(bin "frontend") due to 1 previous error