[IMP] web: highlight searchValue in CommandItem
With this commit, when you perform a search in the command palette, the part of the commandItem's name that matches the searchValue will be highlighted. closes odoo/odoo#82407 Task-id: 2741837 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="web.AppIconCommand" owl="1">
|
||||
<div class="o_command_default">
|
||||
<t t-slot="name"/>
|
||||
<img t-if="props.webIconData" class="o_app_icon" t-attf-src="{{props.webIconData}}"/>
|
||||
<div t-else="" class="o_app_icon" t-attf-style="background-color:{{props.webIcon.backgroundColor}}" >
|
||||
<i t-att-class="props.webIcon.iconClass" t-attf-style="color:{{props.webIcon.color}}"></i>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { computeAppsAndMenuItems } from "@web/webclient/menus/menu_helpers";
|
||||
import { fuzzyLookup } from "@web/core/utils/search";
|
||||
import { computeAppsAndMenuItems } from "@web/webclient/menus/menu_helpers";
|
||||
|
||||
const { Component } = owl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user