@visns-studio/visns-components 3.7.5 → 3.7.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.
@@ -1,29 +1,33 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
 
3
3
  const Select = (props) => {
4
- const { className, dataOptions, inputValue, onChange, options, settings } =
5
- props;
4
+ const { className, dataOptions, inputValue, onChange, options, settings } =
5
+ props;
6
6
 
7
- return (
8
- <select
9
- data-name={settings.id}
10
- className={className}
11
- onChange={onChange}
12
- value={inputValue}
13
- data-show={settings.show ? JSON.stringify(settings.show) : ""}
14
- >
15
- <option value="">Please select an option</option>
16
- {options.map((item, index) => (
17
- <option
18
- key={settings.id + "-" + item.id}
19
- value={item.id}
20
- {...dataOptions[index]}
21
- >
22
- {item.label}
23
- </option>
24
- ))}
25
- </select>
26
- );
7
+ return (
8
+ <select
9
+ data-name={settings.id}
10
+ className={className}
11
+ onChange={onChange}
12
+ value={inputValue}
13
+ data-show={settings.show ? JSON.stringify(settings.show) : ''}
14
+ >
15
+ <option value="">
16
+ {settings.placeholder
17
+ ? settings.placeholder
18
+ : 'Please select an option'}
19
+ </option>
20
+ {options.map((item, index) => (
21
+ <option
22
+ key={settings.id + '-' + item.id}
23
+ value={item.id}
24
+ {...dataOptions[index]}
25
+ >
26
+ {item.label}
27
+ </option>
28
+ ))}
29
+ </select>
30
+ );
27
31
  };
28
32
 
29
33
  export default Select;
@@ -678,7 +678,7 @@ const GenericDynamic = ({
678
678
  </button>
679
679
  )}
680
680
 
681
- {activeForm && (
681
+ {activeForm?.length > 0 && (
682
682
  <>
683
683
  {multiple && activeForm.form_status === 0 ? (
684
684
  <button className="btn" onClick={handleSaveForm}>
package/package.json CHANGED
@@ -50,7 +50,7 @@
50
50
  "react-dom": "^17.0.1"
51
51
  },
52
52
  "name": "@visns-studio/visns-components",
53
- "version": "3.7.5",
53
+ "version": "3.7.7",
54
54
  "description": "Various packages to assist in the development of our Custom Applications.",
55
55
  "main": "index.js",
56
56
  "scripts": {