[IMP] web: add missing documentation for widget options

This commit simply adds documentation in the supportedOptions of the text
field as well as the progressbar field. Since the support of documentation
has been added recently, those options were not yet documented in the
widget declaration.

This will improve the usability of those options in places like Studio

Part-of: odoo/odoo#121495
This commit is contained in:
luvi
2023-07-03 12:21:02 +02:00
parent bbfd5aa614
commit 1239951fe0
2 changed files with 18 additions and 0 deletions
@@ -171,6 +171,16 @@ export const progressBarField = {
type: "field",
availableTypes: ["integer", "float"],
},
{
label: _lt("Overflow style"),
name: "overflow_class",
type: "string",
availableTypes: ["integer", "float"],
help: _lt(
"Bootstrap classname to customize the style of the progress bar when the maximum value is exceeded"
),
default: "bg-secondary",
},
],
supportedTypes: ["integer", "float"],
extractProps: ({ attrs, options }) => ({
@@ -67,6 +67,14 @@ export class TextField extends Component {
export const textField = {
component: TextField,
displayName: _lt("Multiline Text"),
supportedOptions: [
{
label: _lt("Enable line breaks"),
name: "line_breaks",
type: "boolean",
default: true,
},
],
supportedTypes: ["html", "text"],
extractProps: ({ attrs, options }) => ({
placeholder: attrs.placeholder,