Added methods in open and fix problems

This commit is contained in:
MaxOvs
2023-01-06 13:40:18 +03:00
parent 55c4bfaa7c
commit 2f64f9f3a6
7 changed files with 185 additions and 24 deletions

View File

@ -1,5 +1,7 @@
import { IItems } from "../../interfaces/items.interface";
export interface IDataItem{
category?: string;
categoryItems?: string;
ItemValue: object | string | number;
ItemValue: string | IItems | number;
}

View File

@ -8,7 +8,7 @@ import { IDataItem } from './urils.interface';
* @returns {IDataItem | IItems} возвращает сформированный объект
*/
export function getFormatItem(dataItem:IDataItem , index: number):IDataItem | IItems {
export function getFormatItem(dataItem:any , index: number) : IItems {
const random = Math.random().toString(36).substring(2, 10);
let item: IItems;
@ -20,6 +20,7 @@ export function getFormatItem(dataItem:IDataItem , index: number):IDataItem | II
title: dataItem,
value: index
}
return item;
}
}