UNPKG

ldx-widgets

Version:

widgets

115 lines (84 loc) 2.38 kB
[<< Component Index](../README.md) # [SelectPvr](https://github.com/tmfi/ldx-web-utilities/blob/develop/src/components/select_pvr.coffee) Select popover menu with sub-option capability ### options **`Array`** _Required_ array of objects containing at minimum a label and value attribute optionally a subLabel property can be passed --- ### defaultSelected **`Object|String`** _Optional_ value of the option selected by default --- ### close **`Function`** _Required_ func that closes the popover --- ### styleMixin **`Object`** _Optional_ object containing any style properties to mixin with and/or overrride the defaults note that width height are passed separately so they can have defaults and auto settings passing widt/height in this object could cause issues --- ### onChange **`Function`** _Required_ method to call when the non selected option is clicked --- ### hideSelected **`Boolean`** _Optional_ when on, the defaultSelected option will be removed from the list --- ### headerTitle **`String`** _Optional_ optional title String for popover header --- ### headerClass **`String`** _Optional_ optional class for popover header --- ### maxHeight **`Number`** _Optional_ the maximum height the popover should be. used to set height on the pvr if this is lower than the computed height. --- ### pvrProps **`Object`** _Optional_ properties germane to PVR wrapper: width, height, anchor, hAdjust, vAdjust, direction --- ### multiSelect **`Boolean`** _Optional_ allows the component to have multiple selections before firing the onChange handler. when multiSelect is enabled, onChange will be deferred to componentWillUnmount --- ### multiSelectKey **`String|Number`** _Optional_ `default: 'id'` a custom property name can be defined for keying multiSelect options. must be a unique identifier. --- ### multiSelectGroupId **`String|Number`** _Optional_ when `multiSelect = true`, selection scoping can be achieved by providing a group ID to separate selection groups. --- ### footerComponent **`Component`** _Optional_ Create a footer space at the bottom of the SelectPvr with a passed component --- ### footerHeight **`Number`** _Optional_ Set a fixed height to pass as calculated to the Pvr parent component. Used to size the footer space.