Commit 25d1f26e authored by Tristan Cavelier's avatar Tristan Cavelier

[erp5_web_renderjs_ui] fix changing relation input state with empty value_text

Changing the state of a relation_input gadget with value_text = ""
now updates the field.
parent aa133131
......@@ -213,7 +213,7 @@
gadget.element.querySelector(".search_ul").innerHTML = "";
// Display the airplane link or the search button
if ((gadget.state.value_relative_url) || (gadget.state.value_text)) {
if ((gadget.state.value_relative_url) || (gadget.state.value_text !== undefined)) {
createEditableLink(gadget, JUMP_UNKNOWN_CLASS_STR);
} else {
return createEditableButton(gadget, SEARCH_CLASS_STR);
......@@ -233,7 +233,7 @@
// uid is known
// User selected a document from a listbox
if ((gadget.state.value_uid) && (!gadget.state.value_text)) {
if ((gadget.state.value_uid) && (gadget.state.value_text === undefined)) {
plane.className = SEARCHING_CLASS_STR;
return gadget.detachChangeState(gadget.state.value_uid,
gadget.state.catalog_index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment