From b72791f05ba46fa5658ddf914418ece1978524d2 Mon Sep 17 00:00:00 2001 From: Mathieu Duckerts-Antoine Date: Mon, 26 Jun 2023 08:58:48 +0000 Subject: [PATCH] [REF] web: remove unused props in TagsList Some props like className were declared as optional in TagsList while they are not used by the component. We remove them from the props declaration. Part-of: odoo/odoo#126350 --- .../many2many_avatar_user_field.xml | 1 - .../components/records_selector/records_selector.js | 1 - addons/web/static/src/core/tags_list/tags_list.js | 3 --- .../fields/many2many_tags/kanban_many2many_tags_field.xml | 2 +- .../web/static/src/views/fields/properties/property_tags.xml | 5 +---- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/addons/mail/static/src/views/web/fields/many2many_avatar_user_field/many2many_avatar_user_field.xml b/addons/mail/static/src/views/web/fields/many2many_avatar_user_field/many2many_avatar_user_field.xml index 0fa9b6cbe56..b7b1116d3f5 100644 --- a/addons/mail/static/src/views/web/fields/many2many_avatar_user_field/many2many_avatar_user_field.xml +++ b/addons/mail/static/src/views/web/fields/many2many_avatar_user_field/many2many_avatar_user_field.xml @@ -14,7 +14,6 @@ - !props.readonly displayText diff --git a/addons/spreadsheet/static/src/global_filters/components/records_selector/records_selector.js b/addons/spreadsheet/static/src/global_filters/components/records_selector/records_selector.js index 65faf7b9eaa..d76956edb6e 100644 --- a/addons/spreadsheet/static/src/global_filters/components/records_selector/records_selector.js +++ b/addons/spreadsheet/static/src/global_filters/components/records_selector/records_selector.js @@ -23,7 +23,6 @@ export class RecordsSelector extends Component { return this.props.resIds.map((id) => ({ text: this.displayNames[id], onDelete: () => this.removeRecord(id), - displayBadge: true, })); } diff --git a/addons/web/static/src/core/tags_list/tags_list.js b/addons/web/static/src/core/tags_list/tags_list.js index 61e4b267851..dd0210be430 100644 --- a/addons/web/static/src/core/tags_list/tags_list.js +++ b/addons/web/static/src/core/tags_list/tags_list.js @@ -5,12 +5,9 @@ import { Component } from "@odoo/owl"; export class TagsList extends Component { static template = "web.TagsList"; static defaultProps = { - displayBadge: true, displayText: true, }; static props = { - className: { type: String, optional: true }, - displayBadge: { type: Boolean, optional: true }, displayText: { type: Boolean, optional: true }, itemsVisible: { type: Number, optional: true }, tags: { type: Object }, diff --git a/addons/web/static/src/views/fields/many2many_tags/kanban_many2many_tags_field.xml b/addons/web/static/src/views/fields/many2many_tags/kanban_many2many_tags_field.xml index 123a2a31b5e..52dd67fd53a 100644 --- a/addons/web/static/src/views/fields/many2many_tags/kanban_many2many_tags_field.xml +++ b/addons/web/static/src/views/fields/many2many_tags/kanban_many2many_tags_field.xml @@ -3,7 +3,7 @@
- +
diff --git a/addons/web/static/src/views/fields/properties/property_tags.xml b/addons/web/static/src/views/fields/properties/property_tags.xml index 12ddc1432df..7ad8b0d39cb 100644 --- a/addons/web/static/src/views/fields/properties/property_tags.xml +++ b/addons/web/static/src/views/fields/properties/property_tags.xml @@ -3,10 +3,7 @@
- +