[FIX] website: avoid useless re-rendering in URLPicker
Steps to reproduce: - Drop an Text - Image block - Click on the Image - Click on the link button next to replace - Try typing a URL => Typing a URL is hard because the widget keeps re-rendering Reason: Since [1], the jQueryUI urlcomplete widget was changed into an OWL widget. This added a call to `urlChosen` on input, which leads to the SnippetsMenu re-rendering the options. This commit fixes that by remove the call to `urlChosen`. Nothing is lost since the input is already handling its own changes. Instead, urlChosen is only called when selecting an element from the dropdown. [1]: https://github.com/odoo/odoo/commit/86a9171ec7790aa09f2b9a50dcb26deb029e8bed closes odoo/odoo#161045 Signed-off-by: Robin Lejeune (role) <role@odoo.com> Co-authored-by: =?UTF-8?q?Nguy=E1=BB=85n=20=C4=90=E1=BA=A1i=20D=C6=B0=C6=A1ng?= <daiduongnguyen2709@gmail.com>
This commit is contained in:
co-authored by
Nguyễn Đại Dương
parent
5b045d490d
commit
cb0b444359
@@ -84,7 +84,6 @@ export class UrlAutoComplete extends Component {
|
||||
|
||||
onInput({ inputValue }) {
|
||||
this.props.targetDropdown.value = inputValue;
|
||||
this.props.options.urlChosen?.();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user