@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
17 lines (16 loc) • 675 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { SelectList } from '../../components/SelectList';
import { useAdaptable } from '../AdaptableContext';
export const DataSetStatusPanelPopover = () => {
const adaptable = useAdaptable();
const dataSets = adaptable.api.dataSetApi.getDataSets();
const handleDataSetChange = React.useCallback((option) => {
adaptable.api.dataSetApi.setDataSet(option.label);
}, []);
const options = dataSets.map((dataSet) => ({
label: dataSet.name,
value: dataSet.name,
}));
return _jsx(SelectList, { options: options, onChange: handleDataSetChange });
};