Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed Nov 29, 2024
1 parent fc7a144 commit 41a9230
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
53 changes: 49 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

This module contributes the following Components to the language:

* `form` - the wrapping HTML `<form...></form>` component other HTML form tag components. Produces an HTML form.
* `input` - the `<input.../>` HTML form component
* `select` - the `<select ... ></select>` HTML form component
* `form` - the wrapping HTML `<form...></form>` component other[HTML form tag](https://www.w3schools.com/tags/tag_form.asp) components. Produces an HTML form.
* `input` - the [`<input.../>` HTML form component](https://www.w3schools.com/tags/tag_input.asp)
* `select` - the [`<select ... ></select>` HTML form component](https://www.w3schools.com/tags/tag_select.asp)
* `slider` - generates an [HTML 5 input range slider](https://www.w3schools.com/tags/att_input_type_range.asp)
* `textarea` - the `<textarea>...</textarea>` HTML form component
* `textarea` - the [`<textarea>...</textarea>` HTML form component](https://www.w3schools.com/tags/tag_textarea.asp)

The majority of attributes to these components serve as pass-through attributes to the generated HTML tag. Exceptions to these, by tag, include:

Expand Down Expand Up @@ -38,6 +38,51 @@ The following attributes are unsupported and generate a warning log message if u
* `message` - can be provided as a custom message if validation fails
* `passthrough` - this is a list of passthrough attributes which will be added to the form tag.

#### Planned `input` Component Attributes supported

The following have not yet been implemented in the `input` component but are planned for development in the near-term.

* `autosuggest` - Valid only for `type="text"`. Specifies entry completion suggestions to display as the user types into a text input. The user can select a suggestion to complete the text entry. The valid value can be either of the following:
* A string consisting of the suggestion values separated by the delimiter specified by the delimiter attribute.
* A bind expression that gets the suggestion values based on the current input text.
* `autosuggestbinddelay` - Valid only for `type="text"`. The minimum time between autosuggest bind expression invocations, in seconds. Use this attribute to limit the number of requests that are sent to the server when a user types.
* `autosuggestminlength` - Valid only for `type="text"`. The minimum number of characters required in the text box before invoking a bind expression to return items for suggestion.
* `delimiter` - Optional delimiter which informs the `autosuggest` attribute
* `maxresultsdisplayed` - Optional numeric value which informs the max result displayed by the autosuggest
* `onbinderror` - The name of a JavaScript function to execute if evaluating a bind expression, including an autosuggest bind expression, results in an error. The function must take two attributes: an HTTP status code and a message.
* `showautosuggestloadingicon` - A Boolean value that specifies whether to display an animated icon when loading an autosuggest value for a text input.
* `typeahead` - A Boolean value that specifies whether the autosuggest feature should automatically complete a user's entry with the first result in the suggestion list.

#### Unsupported `input` Component Attributes

* `bind` - this attribute is unsupported and will throw an error if used

### `slider`

The slider component creates a [`type="range"` input](https://www.w3schools.com/tags/att_input_type_range.asp) component but access the following additional attributes:

* `increment` - specifies the `step` value of the slider
* `bgColor` - specifies the background color of the slider body
* `color` - specifes the color of the slider control
* `vertical` - Optional boolean attribute. When `true`, the slider will have a vertical orientation

### `textarea`

* `passthrough` - this is a list of passthrough attributes which will be added to the form tag.
* `message` - can be provided as a custom message if validation fails
* `passthrough` - this is a list of passthrough attributes which will be added to the form tag.

#### Unsupported `textarea` Component Attributes

The following attributes are not supported and will be ignored if provided:

* `stylesXML`
* `templatesXML`
* `richtext`
* `toolbar`
* `toolbarOnFocus`


```
|:------------------------------------------------------:|
| ⚡︎ B o x L a n g ⚡︎
Expand Down
2 changes: 1 addition & 1 deletion src/main/bx/components/TextArea.bx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class{
);
}

var nonHTMLAttributes = [ "sourcefortooltip", "validateat", "range", "validate", "bind", "bindattribute", "bindonload", "onvalidate", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "daynames", "firstdayofweek", "monthnames" ];
var nonHTMLAttributes = [ "sourcefortooltip", "validateat", "range", "validate", "bind", "bindattribute", "bindonload", "onvalidate" ];
var conditionalAtrributes = [ "disabled", "autofocus" ];
var evaluativeAttributes = [ "label", "message", "passthrough" ];
var unsupportedAttributes = [ "stylesXML", "templatesXML", "richtext", "toolbar", "toolbarOnFocus" ];
Expand Down

0 comments on commit 41a9230

Please sign in to comment.