Skip to content

Commit d0d9cca

Browse files
author
Cedric Airaud
committed
Bug: unwrap title before setting to value
Change title from None to "": this ensure that on a transition Some(x) -> None the value displayed in the input is changed correctly.
1 parent 181a802 commit d0d9cca

File tree

1 file changed

+1
-1
lines changed
  • packages/yew-bootstrap/src/component/searchable_select

1 file changed

+1
-1
lines changed

packages/yew-bootstrap/src/component/searchable_select/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ pub fn SearchableSelect(props: &SearchableSelectProps) -> Html {
407407
id={ props.id.clone() }
408408
type="text"
409409
class={ classes!("form-control", validation_class) }
410-
value={props.title.clone()}
410+
value={ props.title.clone().unwrap_or("".into()) }
411411
placeholder={props.placeholder.clone()}
412412
readonly={true}
413413
/>

0 commit comments

Comments
 (0)