@scheels-softdev/kendoreact-generics 2.4.6 → 2.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,7 @@ export function GenericDropdown({ data, selectedId, selectedData, onChange, text
35
35
  };
36
36
  // function to handle page changes for virtualization
37
37
  const pageChange = (event) => {
38
+ console.log("page change data: ", event.page, filteredData.current);
38
39
  const skip = event.page.skip;
39
40
  const take = event.page.take;
40
41
  const newSubsetData = filteredData.current.slice(skip, skip + take);
package/Utility.d.ts CHANGED
@@ -1 +1,4 @@
1
1
  export declare const getTextValue: (dataItem: any, fields: string[], separator?: string) => string;
2
+ export declare const getDropdownArray: <T>(data: T[], textFields: (keyof T)[], separator: string) => (T & {
3
+ textValue: string;
4
+ })[];
package/Utility.js CHANGED
@@ -4,3 +4,8 @@ export const getTextValue = (dataItem, fields, separator) => {
4
4
  fields.forEach((field, index) => (textValue += index > 0 ? (separator ? separator : " ") + dataItem[field] : dataItem[field]));
5
5
  return textValue;
6
6
  };
7
+ export const getDropdownArray = (data, textFields, separator) => {
8
+ return data.map((x) => {
9
+ return Object.assign(Object.assign({}, x), { textValue: getTextValue(x, textFields.map((x) => x.toString()), separator) });
10
+ });
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scheels-softdev/kendoreact-generics",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",