@visns-studio/visns-components 5.2.5 → 5.2.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.
package/package.json CHANGED
@@ -78,7 +78,7 @@
78
78
  "react-dom": "^17.0.0 || ^18.0.0"
79
79
  },
80
80
  "name": "@visns-studio/visns-components",
81
- "version": "5.2.5",
81
+ "version": "5.2.7",
82
82
  "description": "Various packages to assist in the development of our Custom Applications.",
83
83
  "main": "src/index.js",
84
84
  "files": [
@@ -215,12 +215,15 @@ function Form({
215
215
  const handleSelectOption = () => {
216
216
  updateFormData({ [id]: inputValue });
217
217
 
218
- // Update any matching form data properties except for the second item
219
- Object.keys(inputValue).forEach((key, index) => {
220
- if (index !== 1 && formData.hasOwnProperty(key)) {
221
- updateFormData({ [key]: inputValue[key] });
222
- }
223
- });
218
+ // Update any matching form data properties
219
+ Object.keys(inputValue)
220
+ .filter(
221
+ (key) =>
222
+ formData.hasOwnProperty(key) &&
223
+ key !== 'id' &&
224
+ key !== 'label'
225
+ )
226
+ .forEach((key) => updateFormData({ [key]: inputValue[key] }));
224
227
 
225
228
  formSettings.fields.forEach((field) => {
226
229
  if (field.id === id && field.trigger) {
@@ -454,7 +454,7 @@ function GenericDashboard({ setting, userProfile }) {
454
454
  <ResponsivePie data={widgetData} {...widget.props} />
455
455
  );
456
456
  case 'bar': {
457
- if (widgetData.keys && widget.props.keys) {
457
+ if (widgetData.keys) {
458
458
  widget.props.keys = widgetData.keys;
459
459
  }
460
460
  let legendMapping = {};
@@ -487,6 +487,7 @@ function GenericDashboard({ setting, userProfile }) {
487
487
  }
488
488
  const barData =
489
489
  widgetData.bar?.data || widgetData.data || widgetData;
490
+
490
491
  if (barData?.length > 0) {
491
492
  return (
492
493
  <div style={{ height: widget.height || '600px' }}>