Usage
Signature:
interface ColorPaletteElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { ColorPaletteElement } from "ojs/ojcolorpalette";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojcolorpalette";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Styling
-
CSS Variables
| Name | Type | Description |
|---|---|---|
--oj-color-palette-swatch-inner-border-color |
<color> | Color palette swatch inner border color |
--oj-color-palette-swatch-outer-border-color-selected |
<color> | Color palette swatch outer border color selected |
--oj-color-palette-border-radius |
<length> | <percentage> | Color palette border radius |
--oj-color-palette-swatch-margin |
<length> | Color palette swatch margin |
--oj-color-palette-grid-font-size |
<length> | Color palette grid font size |
Slots
JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.
-
contextMenu
-
The contextMenu slot is set on the
oj-menuwithin this element. This is used to designate the JET Menu that this component should launch as a context menu on right-click, Shift-F10, Press & Hold, or component-specific gesture. If specified, the browser's native context menu will be replaced by the JET Menu specified in this slot.The application can register a listener for the Menu's ojBeforeOpen event. The listener can cancel the launch via event.preventDefault(), or it can customize the menu contents by editing the menu DOM directly, and then calling refresh() on the Menu.
To help determine whether it's appropriate to cancel the launch or customize the menu, the ojBeforeOpen listener can use component API's to determine which table cell, chart item, etc., is the target of the context menu. See the JSDoc of the individual components for details.
Keep in mind that any such logic must work whether the context menu was launched via right-click, Shift-F10, Press & Hold, or component-specific touch gesture.
- Deprecated:
-
Since Description 13.0.0This web component no longer supports launching a context menu.
Attributes
-
(nullable) described-by :string
-
The oj-label sets the described-by attribute programmatically on the form component. This attribute is not meant to be set by an application developer directly. The described-by is copied to the aria-describedby attribute on the component's inner dom element, and it is needed for accessibility.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property describedByProperty change event describedByChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-described-by-changed -
disabled :boolean
-
Whether the component is disabled. The default is false.
- Deprecated:
-
Since Description 18.0.0Disabled is not supported by the Color Palette UX specification.
- Default Value:
false
- Since:
- 18.0.0
Names
Item Name Property disabledProperty change event disabledChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-disabled-changed -
display-options :Object
-
Form component display options.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property displayOptionsProperty change event displayOptionsChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-display-options-changed -
display-options.converter-hint :Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'display'|'none' display-options.converter-hint :('display'|'none')
-
Display options for auxiliary converter hint text. The supported attribute values are theme dependent.
In the Redwood theme, this attribute determines whether or not the converter hint should be displayed. The supported values are 'display' and 'none'. If you don't want to show the converter hint, set display-options.converter-hint to 'none'. It defaults to 'display'. To control where the hints display, e.g., inline or in a notewindow, then use the user-assistance-density attribute.
- Deprecated:
-
Since Value Description 9.1.0Array<'placeholder'|'notewindow'|'none'>,'placeholder','notewindow' These types are no longer supported. They are used for the Alta theme only. The Redwood theme uses 'display'|'none' and the user-assistance-density attribute. 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property displayOptions.converterHint -
display-options.messages :Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'display'|'none' display-options.messages :('display'|'none')
-
Display options for auxiliary message text. The supported attribute values are theme dependent.
In the Redwood theme, this attribute determines whether or not the messages should be displayed. The supported values are 'display' and 'none'. If you don't want to show messages, set display-options.messages to 'none'. It defaults to 'display'. To control where the messages display, e.g., inline or in a notewindow, then use the user-assistance-density attribute.
- Deprecated:
-
Since Value Description 9.1.0Array<'inline'|'notewindow'|'none'>,'inline','notewindow' These types are no longer supported. They are used for the Alta theme only. The Redwood theme uses 'display'|'none' and the user-assistance-density attribute. 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property displayOptions.messages -
display-options.validator-hint :Array<'notewindow'|'none'>|'notewindow'|'display'|'none' display-options.validator-hint :('display'|'none')
-
Display options for auxiliary validator hint text. The supported attribute values are theme dependent.
In the Redwood theme, this attribute determines whether or not the validator hint should be displayed. The supported values are 'display' and 'none'. If you don't want to show the validator hint, set display-options.validator-hint to 'none'. It defaults to 'display'. To control where the hints display, e.g., inline or in a notewindow, then use the user-assistance-density attribute.
- Deprecated:
-
Since Value Description 9.1.0Array<'notewindow'|'none'>,'notewindow' These types are no longer supported. They are used for the Alta theme only. The Redwood theme uses 'display'|'none' and the user-assistance-density attribute. 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property displayOptions.validatorHint -
help :Object
-
Form component help information.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property helpProperty change event helpChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-help-changed -
help.instruction :string
-
A type of user assistance text. User assistance text is used to provide guidance to help the user understand what data to enter or select.
In the Redwood theme for clarity only one user assistance text shows to the user. The precedence rules are:
- help.instruction shows;
- if no help.instruction, then validator hint shows;
- if no help.instruction or validator hint, then help-hints.definition shows;
- if no help.instruction, validator hint, or help-hints.definition, then converter hint shows.
- help-hints.source always shows along side the above.
In the Redwood theme, by default all user assistance text shows inline. For input components, it shows when the field takes focus. In other components it shows all the time. See the user-assistance-density property for other ways the user assistance text can render.
How is help.instruction better than the html 'title' attribute? The html 'title' attribute only shows up as a tooltip on mouse over, not on keyboard and not in a mobile device. So the html 'title' would only be for text that is not important enough to show all users, or for text that you show the users in another way as well, like in the label. Also you cannot theme the native browser's title window like you can the JET notewindow, so low vision users may have a hard time seeing the 'title' window. For these reasons, the JET EditableValue components do not use the HTML's 'title' attribute and instead use the help.instruction attribute.
To include formatted text in the help.instruction, format the string using html tags. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre. For example the help.instruction might look like:
If you use formatted text, it should be accessible and make sense to the user if formatting wasn't there.<oj-some-element help.instruction="<html>Enter <b>at least</b> 6 characters</html>"></oj-some-element>- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Default Value:
""
- Since:
- 18.0.0
Names
Item Name Property help.instruction -
help-hints :Object
-
The helpHints object contains a definition property and a source property.
definition- hint for help definition text.source- hint for help source URL.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property helpHintsProperty change event helpHintsChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-help-hints-changed -
(nullable) help-hints.definition :string
-
A type of user assistance text. User assistance text is used to provide guidance to help the user understand what data to enter or select. help-hints could come from a help system.
In the Redwood theme for clarity only one user assistance text shows to the user. The precedence rules are:
- help.instruction shows;
- if no help.instruction, then validator hint shows;
- if no help.instruction or validator hint, then help-hints.definition shows;
- if no help.instruction, validator hint, or help-hints.definition, then converter hint shows.
- help-hints.source always shows along side the above.
In the Redwood theme, by default all user assistance text shows inline. For input components, it shows when the field takes focus. In other components it shows all the time. See the user-assistance-density property for other ways the user assistance text can render.
No formatted text is available for help definition attribute.
See the help-hints attribute for usage examples.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Default Value:
""
- Since:
- 18.0.0
Names
Item Name Property helpHints.definition -
(nullable) help-hints.source :string
-
Help source URL associated with the component.
In the Redwood theme, the help-hints.source will show as a link inline to the field. For input components, it shows when the field takes focus. For other components, it shows all the time.
For security reasons we only support urls with protocol 'http:' or 'https:'. If the url doesn't comply we ignore it and throw an error. Pass in an encoded URL since we do not encode the URL.
See the help-hints attribute for usage examples.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Default Value:
""
- Since:
- 18.0.0
Names
Item Name Property helpHints.source -
label-display :"auto"|"off"
-
Specifies whether a text label accompanies the color swatch.
- Deprecated:
-
Since Description 18.0.0This is deprecated as labels are no longer supported.
- Default Value:
"off"
Supported Values:
Value Description autolabels are displayed if the layout property is 'list' and swatch-size is 'sm' or if the layout is 'grid' and swatch-size is 'lg' offlabels are not displayed Names
Item Name Property labelDisplayProperty change event labelDisplayChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-display-changed -
label-edge :('inside'|'none'|'provided')
-
Specifies how the label of the component is created when the
label-hintattribute is set on the component.The default value varies by theme, and it works well for the theme in most cases. If the component is in an oj-form-layout, the label-edge attribute could come from the oj-form-layout's label-edge attribute. The oj-form-layout component uses the MetadataTypes.PropertyBinding
provideproperty to provide and uses the MetadataTypes.ProvidePropertytransformproperty to transform itslabel-edgeattribute to any descendent components that are configured to consume it. For example, if the oj-form-layout's label-edge attribute is set to "top" or "start", and a descendent form component does not have its label-edge attribute set, the form component's label-edge will be the transformed value "provided".- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Supported Values:
Value Description insideThe component creates the label using the label-hintattribute.For text input components (such as oj-input-text), the label floats over the input element but moves up on focus or when the component has a value.
For non-text input components (such as oj-checkboxset), the label is created at the top of the component and doesn't move.
noneThe component will not have a label, regardless of whether it's in an oj-form-layout or not. If the component has a
label-hintattribute but no labelled-by, aria-label, or aria-labelledby attribute, the label-hint value will be used as the aria-label.Note that if the component already has an external label, "none" should not be specified and "provided" should be used instead. Otherwise it may end up with conflicting label information.
providedLabel is provided by the parent if the parent is an oj-form-layout. oj-form-layout provides the label using the label-hint from the form control and the label-edge from oj-form-layout.
If there is no oj-form-layout, use an oj-label.
Names
Item Name Property labelEdgeProperty change event labelEdgeChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-edge-changed -
label-hint :string
-
Represents a hint for rendering a label on the component.
This is used in combination with the label-edge attribute to control how the label should be rendered.
When label-edge is "provided", it gives a hint to oj-form-layout parent element to create an oj-label element for the component. When the
label-hintattribute changes, oj-form-layout element refreshes to display the updated label information.When label-edge is "inside", it gives a hint to the component itself to render a label.
When label-edge is "none", and if the component has no labelled-by, aria-label, or aria-labelledby attribute, the label-hint value will be used as the aria-label.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Default Value:
""
- Since:
- 18.0.0
Names
Item Name Property labelHintProperty change event labelHintChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-hint-changed -
(nullable) labelled-by :string
-
Labelled-by is used to establish a relationship between this and another element. A common use is to tie the oj-label and the oj-color-palette together for accessibility. The oj-label custom element has an id, and you use the labelled-by attribute to tie the two elements together to facilitate correct screen reader behavior.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Default Value:
null
Names
Item Name Property labelledByProperty change event labelledByChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-labelled-by-changed -
layout :"grid"|"list"
-
Specifies the layout of the color swatches.
- Deprecated:
-
Since Description 18.0.0This is deprecated as only grid layout values are now supported.
- Default Value:
"grid"
Supported Values:
Value Description gridLayout the color swatches in a grid listLayout the color swatches in a list Names
Item Name Property layoutProperty change event layoutChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-layout-changed -
messages-custom :Array<oj.Message>
-
List of messages an app would add to the component when it has business/custom validation errors that it wants the component to show. This allows the app to perform further validation before sending data to the server. When this option is set the message shows to the user right away. To clear the custom message, set
messagesCustomback to an empty array.
Each message in the array is an object that duck types oj.Message. See Message for details. message detail text can include formatted HTML text, whereas hints and message summary text cannot. If you use formatted text, it should be accessible and make sense to the user if formatting wasn't there. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre. To format the message detail, you could do this:
<html>Enter <b>at least</b> 6 characters</html>See the Validation and Messages section for details on when the component clears
messagesCustom; for example, when full validation is run.In the Redwood theme, the Message summary is not displayed to the user, so make sure to have a Message detail set in your Message object.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Default Value:
[]
- Supports writeback:
true
- Since:
- 18.0.0
Names
Item Name Property messagesCustomProperty change event messagesCustomChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-messages-custom-changed -
palette :Array<{color: oj.Color, label?: string}>
-
Specify an array of objects defining the palette's color set, and optionally, descriptive labels for the colors. Each object has the following structure:
- Deprecated:
-
Since Description 18.0.0The Redwood UX specification does not support labels. - Default Value:
null
Properties:
Name Type Argument Description coloroj.Color the color definition labelstring <optional>
optional descriptive string (refer to attribute label-display). If omitted, label defaults to the color's hex string format. Names
Item Name Property paletteProperty change event paletteChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-palette-changed -
placeholder :string
-
The placeholder text to set on the element.
- Deprecated:
-
Since Description 18.0.0oj-color-palette doesn't have a text input, so this was never needed.
Names
Item Name Property placeholderProperty change event placeholderChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-placeholder-changed -
swatch-size :"xs"|"sm"|"lg" swatch-size :"xs"|"sm"
-
The swatch size. If the size is 'sm' or 'xs', the color label property is used as a tooltip.
- Deprecated:
-
Since Description 18.0.0The Redwood UX specification does not support large swatch size. - Default Value:
"sm"
Supported Values:
Value Description xsextra small swatch smsmall swatch lglarge swatch Names
Item Name Property swatchSizeProperty change event swatchSizeChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-swatch-size-changed -
translations :Object
-
A collection of translated resources from the translation bundle, or
nullif this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.If this component has translations, their documentation immediately follows this doc entry.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to be validated, display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Since:
- 18.0.0
Names
Item Name Property translationsProperty change event translationsChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-translations-changed -
translations.label-none :string
-
Label for swatch with no color.
See the translations attribute for usage examples.
- Default Value:
"None"
Names
Item Name Property translations.labelNone -
user-assistance-density :('reflow'|'efficient'|'compact')
-
Note: This attribute is not supported in the following themes:
Alta -
Specifies the density of the form component's user assistance presentation. It can be shown inline with reserved rows to prevent reflow if a user assistance text shows up, inline without reserved rows that would reflow if a user assistance text shows up, or it can be shown compactly in a popup instead.
The default value is 'reflow' when the form component is not a descendent of an oj-form-layout component. When the form component is a descendent of an oj-form-layout, the default value comes from the oj-form-layout's
user-assistance-densityattribute value.The oj-form-layout component uses the MetadataTypes.PropertyBinding
provideproperty to provide itsuser-assistance-densityattribute value to be consumed by descendent components. The form components are configured to consume theuser-assistance-densityproperty if an ancestor provides it and it is not explicitly set on the form component. Example, oj-form-layout defaults user-assistance-density='efficient', so all its form components descendents will have user-assistance-density='efficient' by default.- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Default Value:
"reflow"
- Since:
- 18.0.0
Supported Values:
Value Description compactMessages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like a popup for the messages, and a required icon to indicate Required. efficientMessages, help, hints, and required are all shown inline under the field with reserved space. reflowMessages, help, hints, and required are all shown inline under the field with no reserved space. Names
Item Name Property userAssistanceDensityProperty change event userAssistanceDensityChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-user-assistance-density-changed -
(readonly) valid :"valid"|"pending"|"invalidHidden"|"invalidShown"
-
The current valid state of the component. It is evaluated on initial render. It is re-evaluated
- after each validator (validators or async-validators) is run (full or deferred)
- when messagesCustom is updated, since messagesCustom can be added by the app developer any time.
- when showMessages() is called. Since showMessages() moves the hidden messages into messages shown, if the valid state was "invalidHidden" then it would become "invalidShown".
- when the required property has changed. If a component is empty and has required set, the valid state may be "invalidHidden" (if no invalid messages are being shown as well). If required property is removed, the valid state would change to "valid".
Note: New valid states may be added to the list of valid values in future releases. Any new values will start with "invalid" if it is an invalid state, "pending" if it is pending state, and "valid" if it is a valid state.
- Deprecated:
-
Since Description 18.0.0The oj-color-palette is not meant to be validated, display messages, be labelled, or be in a form layout by itself. Per the Redwood UX specification, the oj-color-palette is not intended to be a form component.
- Supports writeback:
true
- Since:
- 18.0.0
Supported Values:
Value Description invalidHiddenThe component has invalid messages hidden and no invalid messages showing. An invalid message is one with severity "error" or higher. invalidShownThe component has invalid messages showing. An invalid message is one with severity "error" or higher. pendingThe component is waiting for the validation state to be determined. The "pending" state is set at the start of the convert/validate process. validThe component is valid Names
Item Name Property validProperty change event validChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-valid-changed -
value :oj.Color
-
The current value of the palette element.
- Default Value:
null
- Supports writeback:
true
Names
Item Name Property valueProperty change event valueChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-value-changed
Events
-
ojAnimateEnd
-
Triggered when a default animation has ended.
- Deprecated:
-
Since Description 12.1.0This web component no longer supports this event.
- "inline-open" - when an inline message container opens or increases in size
- "inline-close" - when an inline message container closes or decreases in size
- "notewindow-open" - when a note window opens
- "notewindow-close" - when a note window closes
- Since:
- 12.1.0
Properties:
All of the event payloads listed below can be found under
event.detail. See Events and Listeners for additional information.Name Type Description actionstring The action that triggered the animation.
Supported values are:elementElement The element being animated. -
ojAnimateStart
-
Triggered when a default animation is about to start on an element owned by the component.
The default animation can be cancelled by calling
event.preventDefault, followed by a call toevent.detail.endCallback.event.detail.endCallbackshould be called immediately afterevent.preventDefaultif the application merely wants to cancel animation, or it should be called when the custom animation ends if the application is invoking another animation function. Failure to callevent.detail.endCallbackmay prevent the component from working properly.For more information on customizing animations, see the documentation of AnimationUtils.
The default animations are controlled via the theme: // default animations for notewindow help and hints and messages $popupTailOpenAnimation: (effect: "zoomIn", transformOrigin: "#myPosition") !default; $popupTailCloseAnimation: (effect: "none") !default; // default animations for Redwood's inline messages shown when userAssistanceDensity // is reflow or efficient. $messageComponentInlineOpenAnimation: (effect: "fadeIn", duration: "100ms", timingFunction: "linear") !default; $messageComponentInlineCloseAnimation: (effect: "fadeOut", duration: "100ms", timingFunction: "linear") !default;- Deprecated:
-
Since Description 12.1.0This web component no longer supports this event.
- "inline-hints-open" - when an inline helphints container opens
- "inline-hints-close" - when an inline helphints container closes
- "inline-open" - when an inline message container opens or increases in size
- "inline-close" - when an inline message container closes or decreases in size
- "notewindow-open" - when a note window opens
- "notewindow-close" - when a note window closes
- Since:
- 12.1.0
Properties:
All of the event payloads listed below can be found under
event.detail. See Events and Listeners for additional information.Name Type Description actionstring The action that triggers the animation.
Supported values are:elementElement The element being animated. endCallbackfunction():void If the event listener calls event.preventDefault to cancel the default animation, it must call the endCallback function when it finishes its own animation handling and any custom animation has ended.
Methods
-
getProperty(property) : {any}
-
Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. Returns:
- Type
- any
-
refresh : {void}
-
Refreshes the visual state of the ColorPalette. JET components require a
refresh()after the DOM is programmatically changed underneath the component.This method does not accept any arguments.
- Deprecated:
-
Since Description 18.0.0This is not supported in the Redwood UX specification.
Returns:
- Type
- void
-
reset : {void}
-
Resets the component by clearing all messages and messages attributes -
messagesCustom- and updates the component's display value using the attribute value. User entered values will be erased when this method is called.- Deprecated:
-
Since Description 18.0.0This is not supported in the Redwood UX specification.
- Since:
- 18.0.0
Returns:
- Type
- void
-
setProperties(properties)
-
Performs a batch set of properties.
Parameters:
Name Type Description propertiesObject An object containing the property and value pairs to set. -
setProperty(property, value)
-
Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. valueany The new value to set the property to. -
showMessages : {void}
-
Takes all deferred messages and shows them. It then updates the valid property; e.g., if the valid state was "invalidHidden" before showMessages(), the valid state will become "invalidShown" after showMessages().
If there were no deferred messages this method simply returns.
- Deprecated:
-
Since Description 18.0.0This is not supported in the Redwood UX specification.
- Since:
- 18.0.0
Returns:
- Type
- void