[REM] web, web_editor: remove throttle function
This function is deprecated as its behaviour is closer to "debounce". Furthermore, it is not covered by any tests. Only one usage has been found in the code base: - the VideoSelector component from web_editor This usage has been replaced by the "debounce" timing utility, which is appropriate considering what the code tries to do. Part-of: odoo/odoo#112913
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { useService } from '@web/core/utils/hooks';
|
||||
import { throttle } from '@web/core/utils/timing';
|
||||
import { debounce } from '@web/core/utils/timing';
|
||||
import { qweb } from 'web.core';
|
||||
|
||||
import { Component, useState, useRef, onMounted, onWillStart } from "@odoo/owl";
|
||||
@@ -98,7 +98,7 @@ export class VideoSelector extends Component {
|
||||
}));
|
||||
});
|
||||
|
||||
this.onChangeUrl = throttle((ev) => this.updateVideo(ev.target.value), 500);
|
||||
this.onChangeUrl = debounce((ev) => this.updateVideo(ev.target.value), 500);
|
||||
}
|
||||
|
||||
get shownOptions() {
|
||||
|
||||
Reference in New Issue
Block a user