Socket
Socket
Sign inDemoInstall

@hundh/contao-choices-bundle

Package Overview
Dependencies
12
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hundh/contao-choices-bundle

This package contains the frontend assets of the composer bundle heimrichhannot/contao-choices-bundle.


Version published
Maintainers
1
Created

Readme

Source

Contao Choices Bundle Assets

This package contains the frontend assets of the composer bundle heimrichhannot/contao-choices-bundle.

Install

Typicall this package comes with Contao Choices Bundle. If you want to install it by yourself:

yarn add @hundh/contao-choices-bundle

Usage

If you want to use the bundle independent of Choices Bundle:

import ChoicesBundle from '@hundh/contao-choices-bundle'

ChoicesBundle.init();

Choices.js will be added to all select and text fields with attribute data-choices=1.

Options

You can pass options to Choices constructor by adding them json_encoded to data-choices-options attribute.

Translations

Translations can be passed as options to Choices. For callback translation (addItemText, maxItemText) two additional options added: addItemTextString and maxItemTextString.

API

init

Apply a choice instance to all inputs with attribute data-choices=1. You can pass additional options as json string in data-choices-options attribute.

getChoiceInstances

Returns an array of objects containing element and choice instance.

[{element: HTMLElement, instance: ChoiceInstance},...]

FAQs

Last updated on 03 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc