@apexcura/ui-components 0.0.9-Beta6 → 0.0.9-Beta7

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.
package/dist/index.d.mts CHANGED
@@ -18,7 +18,7 @@ type ElementType = {
18
18
  maxLength?: number;
19
19
  fieldNames?: any[];
20
20
  onChange?: (value: string | number | boolean | any[]) => void;
21
- dropDownOptions: any[];
21
+ dropDownOptions?: any[];
22
22
  };
23
23
 
24
24
  interface ElementExecuterProps$3 extends ElementType {
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ type ElementType = {
18
18
  maxLength?: number;
19
19
  fieldNames?: any[];
20
20
  onChange?: (value: string | number | boolean | any[]) => void;
21
- dropDownOptions: any[];
21
+ dropDownOptions?: any[];
22
22
  };
23
23
 
24
24
  interface ElementExecuterProps$3 extends ElementType {
package/dist/index.js CHANGED
@@ -309,7 +309,7 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
309
309
  var SingleSelectElement = (props) => {
310
310
  const handleChange = (values) => {
311
311
  if (props.onChange) {
312
- const option = props.dropDownOptions.find((option2) => String(option2.title) === values);
312
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === values);
313
313
  const selectedOption = { id: option?.id, value: values };
314
314
  props.onChange([selectedOption]);
315
315
  }
@@ -335,7 +335,7 @@ var MultipleSelectElement = (props) => {
335
335
  const handleChange = (values) => {
336
336
  if (props.onChange) {
337
337
  const selectedOptions = values.map((value) => {
338
- const option = props.dropDownOptions.find((option2) => String(option2.title) === value);
338
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === value);
339
339
  return { id: option?.id, value };
340
340
  });
341
341
  props.onChange(selectedOptions);
package/dist/index.mjs CHANGED
@@ -263,7 +263,7 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
263
263
  var SingleSelectElement = (props) => {
264
264
  const handleChange = (values) => {
265
265
  if (props.onChange) {
266
- const option = props.dropDownOptions.find((option2) => String(option2.title) === values);
266
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === values);
267
267
  const selectedOption = { id: option?.id, value: values };
268
268
  props.onChange([selectedOption]);
269
269
  }
@@ -289,7 +289,7 @@ var MultipleSelectElement = (props) => {
289
289
  const handleChange = (values) => {
290
290
  if (props.onChange) {
291
291
  const selectedOptions = values.map((value) => {
292
- const option = props.dropDownOptions.find((option2) => String(option2.title) === value);
292
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === value);
293
293
  return { id: option?.id, value };
294
294
  });
295
295
  props.onChange(selectedOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.9-Beta6",
3
+ "version": "0.0.9-Beta7",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",