/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ import React, {Component} from 'react'; import {Layout} from 'flipper-plugin'; import {Button, Menu, Checkbox, Dropdown} from 'antd'; import {DownOutlined} from '@ant-design/icons'; // This import is OK since it is a type-only import // eslint-disable-next-line no-restricted-imports import type {CheckboxChangeEvent} from 'antd/lib/checkbox'; export default class MultipleSelect extends Component<{ selected: Set; options: Set; label: string; onChange: (selectedItem: string, checked: boolean) => void; }> { handleOnChange = (option: string, event: CheckboxChangeEvent) => { this.props.onChange(option, event.target.checked); }; menu = () => { return ( {Array.from(this.props.options).map((option, index) => ( this.handleOnChange(option, e)} checked={this.props.selected.has(option)} />{' '} {option} ))} ); }; render() { return ( ); } }