i
Miscellaneous
Access methods are used to retrieve items or access specific functionalities.
Access Method
Name |
Description |
Result |
---|---|---|
$d.createSelect(configuration, container) |
Creates a selection list, within a container, with the values specified in the configuration sent by parameter.
Parameters •Object configuration: List configuration object •DOMElement string container: Container where the list will be displayed
Example
let itemsList = [ { value: 'Argentina' id: '1' }, { value: 'Chile:', id: '2' }, { value: 'Brazil', id: '3' }, { value: 'Paraguay', id: '4' } ]; $d.createSelect({ idKey: "id", valueKey: "value", list: itemsList, test_id: "types", onHandleSelectItem: handleChangeTypeFilter, placeholder: 'Select Item' }, 'container1');
function handleChangeTypeFilter(value) { console.log("value ",value);}
Notes
•The format of the list must be as specified. •The value of the idKey attribute is the identifier of each item. •The value of the valueKey attribute is the attribute on which to filter. •In the onHandleSelectItem attribute, the function to be executed is sent when an item is selected. In the example, the function handleChangeTypeFilter was passed, which prints the value on the screen. |
UpdateSelectFunctions: Object with functions |
$d.createSelectMultiple(configuration, container) |
Creates a multiple selection list, within a container, with the values specified in the configuration sent by parameter.
Parameters •Object configuration: List configuration object •DOMElement string container: Container where the list will be displayed
Example
let itemsList = [ { value: 'CRM', id: '1' } ];
function showSelect() { componentSelect = $d.createSelectMultiple({ idKey: "id", valueKey: "value", list: itemsList, selects: selectedApps, placeholder: " Select application...", functions: { onChange: handleChangeTypeFilter, }, }, "selectApps");
function handleChangeTypeFilter(value) { console.log("value ",value);} } }
|
UpdateSelectMultipleFunctions: Object with functions |
$d.createTextEditor(configuration, container) |
Creates a rich text editor within a specified container. •Object configuration: List configuration object •DOMElement string container: Container where the list will be displayed
Example
let textEditorProps = { initialValue: "text", onChange: handleChangeTextEditor, options: [ "blockType", "fontFamily", "fontSize", "textAlign", "colorPicker", "inline", "history", ], inlineOptions: ["bold", "italic", "underline", "strikethrough"], blockTypeOptions: ["Normal", "H1", "H2", "H3", "H4", "H5", "H6"], fontFamilyOptions: [ "Arial", "Brush Script MT, cursive", "Calibri", "Courier New", "Georgia", "Lucida Sans Typewriter, monospace", "Roboto Medium", "Roboto", "Tahoma", "Times New Roman", "Trebuchet MS", ], }; $d.createTextEditor(textEditorProps, "container1");
|
- |
$d.getAttributeDataType(idElement, attributeName) |
Gets the attribute data sent by parameter of a given element.
Parameters •String idElement: Element identifier •String attributeName: Name of the attribute to show Possible Values: "value" | "editable" | "visible" |
String |
$d.getCurrentBreakpoint() |
Gets the current breakpoint. |
String "DESKTOP" | "TABLET" | "MOBILE" |