Skip to content

Commit

Permalink
move functnions out of selectable component
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <menwe@amazon.com>
  • Loading branch information
mengweieric committed Oct 5, 2023
1 parent d56bc1d commit ff8f3ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const getDataSetWithSource = async (ds: GenericDataSource): Promise<ISourceDataS
const getDataSets = (dataSources: GenericDataSource[]) =>
dataSources.map((ds) => getDataSetWithSource(ds));

const isIndexPatterns = (dataSet: DataSetType): dataSet is IndexPatternOption => {
export const isIndexPatterns = (dataSet: DataSetType): dataSet is IndexPatternOption => {
if (typeof dataSet === 'string') return false;

return !!(dataSet.title && dataSet.id);
};

// Get the option format for the combo box from the dataSource and dataSet.
const getSourceOptions = (dataSource: DataSourceType, dataSet: DataSetType) => {
export const getSourceOptions = (dataSource: DataSourceType, dataSet: DataSetType) => {
const optionContent = {
type: dataSource.getType(),
name: dataSource.getName(),
Expand Down

0 comments on commit ff8f3ef

Please sign in to comment.