Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/multi-select/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ const value = multiSelect.value;

| Attribute | Required | Values | Notes |
|-----------------|----------|--------------------------|-------------------------------------------------------------------------------------|
| name | Yes | <name of the form field> | Whether the height of the slider changes depending on the content inside the slides |
| name | Yes | \<name of the form field\> | The name that is given to the form field. |
| multiple | No | `yes`, `no` | Whether the field needs to be a single or mult-select form field. Yes by default |
| close-on-select | No | `yes` | Whether to close the options when a value is selected |
| form | No | \<id of the form\> | The id of the form with which the select input will be linked and submitted. |

## Events

Expand Down
1 change: 1 addition & 0 deletions src/multi-select/tp-multi-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export class TPMultiSelectElement extends HTMLElement {
if ( ! selectElement ) {
selectElement = document.createElement( 'select' );
selectElement.setAttribute( 'name', this.getAttribute( 'name' ) ?? '' );
selectElement.setAttribute( 'form', this.getAttribute( 'form' ) ?? '' );

if ( 'no' !== this.getAttribute( 'multiple' ) ) {
selectElement.setAttribute( 'multiple', 'multiple' );
Expand Down