committed by
Laurent Smet
parent
c08fa433e4
commit
bcc5a6efbf
@@ -332,22 +332,26 @@ export class ViewAdapter extends ActionAdapter {
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
async updateWidget() {
|
||||
async updateWidget(nextProps) {
|
||||
const shouldUpdateWidget = this.shouldUpdateWidget;
|
||||
this.shouldUpdateWidget = true;
|
||||
if (!shouldUpdateWidget) {
|
||||
return this.magicReload();
|
||||
}
|
||||
await this.widget.willRestore();
|
||||
const options = Object.assign({}, this.props.viewParams, {
|
||||
const options = {
|
||||
...this.props.viewParams,
|
||||
...nextProps.viewParams,
|
||||
shouldUpdateSearchComponents: true,
|
||||
});
|
||||
};
|
||||
if (!this.magicReload()) {
|
||||
this.widget.reload(options);
|
||||
}
|
||||
return this.magicReload();
|
||||
}
|
||||
|
||||
async renderWidget() {}
|
||||
|
||||
/**
|
||||
* Override to add the state of the legacy controller in the exported state.
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ QUnit.module("View service", (hooks) => {
|
||||
|
||||
hooks.beforeEach(() => {
|
||||
const views = {
|
||||
"take.five,99,list": `<list><field name="display_name" /><list>`,
|
||||
"take.five,99,list": `<list><field name="display_name" /></list>`,
|
||||
};
|
||||
|
||||
const models = {
|
||||
|
||||
Reference in New Issue
Block a user