ybc
ybc copied to clipboard
Loading prop has no effect
First thanks for working on this lib! I'm a newcomer trying it out.
I believe the loading prop for TextArea has no effect, as the loading spinner animation exists in a html ::after that is present when a is-loading class exists in a control wrapper element.
The following rust:
<ybc::Field
label={".."}
help={".."}
><ybc::Control
tag={"div"}
classes={classes!("")}
><ybc::TextArea
name={"example"}
value={""}
update={link.callback(Msg::TextAreaUpdated)}
placeholder={".."}
loading=true
/></ybc::Control></ybc::Field>
Results in the following html (in which the spinner is not present) :
<div class="field">
<label class="label">..</label>
<div class="control">
<textarea name="example" placeholder=".." rows="0" class="textarea is-loading"></textarea>
</div>
<label class="help">..</label>
</div>
Note: the .field.control.is-loading is set.
But the following rust:
<ybc::Field
label={".."}
help={".."}
><ybc::Control
tag={"div"}
classes={classes!("is-loading")}
><ybc::TextArea
name={"example"}
value={""}
update={link.callback(Msg::TextAreaUpdated)}
placeholder={".."}
/></ybc::Control></ybc::Field>
Results in the following html (in which the spinner is present) :
<div class="field">
<label class="label">..</label>
<div class="control is-loading">
<textarea name="example" placeholder=".." rows="0" class="textarea"></textarea>
::after
</div>
<label class="help">..</label>
</div>
Note: The .field.control and the .field.is-loading are set.