import * as React from "react"; import {MmuiDropChoiceMultipleComponent, MmuiDropChoiceMultipleProps} from "../../mmui-react-component"; import {renderDropChoiceDropdown} from "./common"; export interface MmuiBlueDropChoiceMultipleProps extends MmuiDropChoiceMultipleProps { } export class MmuiBlueDropChoiceMultipleComponent
extends MmuiDropChoiceMultipleComponent
{ constructor(props) { super(props); } getTokenRender(choice, parent = undefined){ let key = `token-${choice.id}`, display = choice.display, isCheckedParent = choice.isChecked && choice.children && choice.children.length > 0; if (parent) { display = `${parent.display} - ${display}`; } else if (isCheckedParent) { display = `${display} - All`; } return ( {display} ) } renderChoiceInput(choice) { const choiceInputProps: any = { id: choice.id, name: choice.name, value: choice.value, checked: choice.isChecked, }, choiceStyle: any = { display: 'block' }; if (choice.isParent) { choiceInputProps['data-isparent'] = 'true'; } else { choiceInputProps['data-parentid'] = choice.parentValue; } if (!choice.isVisible) { choiceStyle.display = 'none'; } if (!this.props.hasParentSelection && choice.children) { return {choice.display}; } return (