UNPKG

gd-sprest-bs

Version:

SharePoint JavaScript, TypeScript and Web Components designed using the Bootstrap framework.

20 lines (19 loc) 709 B
import { Components } from "../components/core"; import { _Dropdown } from "./dropdown"; /** * Dropdown Checkbox */ class _DropdownCheckbox extends _Dropdown { // Override the rendering method to customize the type onRendering(props) { // Set the type and placement props.placeholder = this.config.placeholder; props.placement = this.config.placement || Components.DropdownPlacements.Left; props.type = Components.FormControlTypes.DropdownCheckbox; // Return the props return props; } } export const DropdownCheckbox = (targetProperty, config, context) => { return new _DropdownCheckbox(targetProperty, config, context); };