UNPKG

opendash

Version:

open.DASH data visualization framework

10 lines 659 B
import * as React from "react"; import { Select } from "antd"; import { useSource } from ".."; export function SourcePicker(_a) { var value = _a.value, onChange = _a.onChange; var _b; var _c = useSource(), sources = _c[2]; return (React.createElement(Select, { style: { width: 200 }, value: (_b = value) === null || _b === void 0 ? void 0 : _b.id, onChange: function (id) { return onChange(sources.find(function (source) { return source.id === id; })); } }, sources.map(function (source) { return (React.createElement(Select.Option, { key: source.id, value: source.id }, source.name)); }))); } //# sourceMappingURL=SourcePicker.js.map