[FIX] web: Command Palette FooterComponent
This commit solves a naming error introduced by commit 1e1b45ea62, the name of a component always starts with a capital letter.
closes odoo/odoo#82629
Related: odoo/enterprise#23285
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit is contained in:
@@ -37,7 +37,7 @@ const FUZZY_NAMESPACES = ["default"];
|
||||
* @typedef {{
|
||||
* categoriesByNamespace?: {[namespace]: string[]};
|
||||
* emptyMessageByNamespace?: {[namespace]: string};
|
||||
* footerComponent?: Component;
|
||||
* FooterComponent?: Component;
|
||||
* placeholder?: string;
|
||||
* providers: Provider[];
|
||||
* searchValue?: string;
|
||||
@@ -84,7 +84,7 @@ export class CommandPalette extends Component {
|
||||
/**
|
||||
* @type {{ commands: CommandItem[],
|
||||
* emptyMessage: string,
|
||||
* footerComponent: Component,
|
||||
* FooterComponent: Component,
|
||||
* placeholder: string,
|
||||
* searchValue: string,
|
||||
* selectedCommand: CommandItem }}
|
||||
@@ -132,7 +132,7 @@ export class CommandPalette extends Component {
|
||||
this.emptyMessageByNamespace = config.emptyMessageByNamespace || {};
|
||||
this.providersByNamespace = result;
|
||||
|
||||
this.state.footerComponent = config.footerComponent;
|
||||
this.state.FooterComponent = config.FooterComponent;
|
||||
|
||||
this.state.placeholder = config.placeholder || DEFAULT_PLACEHOLDER.toString();
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div t-if="state.footerComponent" class="o_command_palette_footer">
|
||||
<t t-component="state.footerComponent"/>
|
||||
<div t-if="state.FooterComponent" class="o_command_palette_footer">
|
||||
<t t-component="state.FooterComponent"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@ export const commandService = {
|
||||
{
|
||||
categoriesByNamespace,
|
||||
emptyMessageByNamespace,
|
||||
footerComponent: DefaultFooter,
|
||||
FooterComponent: DefaultFooter,
|
||||
placeholder: env._t("Search for a command..."),
|
||||
providers: commandProviderRegistry.getAll(),
|
||||
},
|
||||
|
||||
@@ -26,8 +26,8 @@ let target;
|
||||
let testComponent;
|
||||
const serviceRegistry = registry.category("services");
|
||||
|
||||
class footerComponent extends Component {}
|
||||
footerComponent.template = xml`<span>My footer</span>`;
|
||||
class FooterComponent extends Component {}
|
||||
FooterComponent.template = xml`<span>My footer</span>`;
|
||||
|
||||
class TestComponent extends Component {
|
||||
get DialogContainer() {
|
||||
@@ -154,7 +154,7 @@ QUnit.test("add a footer", async (assert) => {
|
||||
testComponent = await mount(TestComponent, { env, target });
|
||||
const config = {
|
||||
providers: [],
|
||||
footerComponent,
|
||||
FooterComponent,
|
||||
};
|
||||
env.services.dialog.add(CommandPaletteDialog, {
|
||||
config,
|
||||
@@ -963,7 +963,7 @@ QUnit.test("multi level command", async (assert) => {
|
||||
];
|
||||
const config = {
|
||||
emptyMessageByNamespace,
|
||||
footerComponent,
|
||||
FooterComponent,
|
||||
placeholder: "placeholder test",
|
||||
providers,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user