@wonderflow/react-components 8.5.0 → 8.6.0

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 +1 @@
1
- {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/autocomplete.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAEnF,OAAO,EACK,yBAAyB,EAEd,SAAS,EAC/B,MAAM,OAAO,CAAA;AAEd,OAAO,EAAyB,cAAc,EAAmB,MAAM,cAAc,CAAA;AAIrF,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,aAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,oBAAY,iBAAiB,GAAG,cAAc,GAAG;IAC/C;;OAEG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC;;;MAGE;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,aAAK,qBAAqB,GAAG,yBAAyB,CAAC,iBAAiB,CAAC,GAAG;IAC1E,MAAM,EAAE,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAA;AAqBD,eAAO,MAAM,YAAY,uBAyJE,CAAA"}
1
+ {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/autocomplete.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAEnF,OAAO,EACK,yBAAyB,EAEd,SAAS,EAC/B,MAAM,OAAO,CAAA;AAEd,OAAO,EAAyB,cAAc,EAAmB,MAAM,cAAc,CAAA;AAIrF,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,aAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,oBAAY,iBAAiB,GAAG,cAAc,GAAG;IAC/C;;OAEG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC;;;MAGE;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,aAAK,qBAAqB,GAAG,yBAAyB,CAAC,iBAAiB,CAAC,GAAG;IAC1E,MAAM,EAAE,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAA;AAqBD,eAAO,MAAM,YAAY,uBA4JE,CAAA"}
@@ -71,11 +71,13 @@ export const Autocomplete = forwardRef(({ children, onChange, disabled, readOnly
71
71
  setValue(currentTarget.value);
72
72
  onChange?.({
73
73
  query: currentTarget.value,
74
- value: optionsValues.includes(currentTarget.value) ? currentTarget.value : ''
74
+ value: optionsValues.includes(currentTarget.value.toLowerCase()) ? currentTarget.value : ''
75
75
  });
76
76
  }, [onChange, optionsValues]);
77
77
  useEffect(() => {
78
- const currentValues = Children.map(filteredOptions, (o) => o.props.value);
78
+ const currentValues = Children.map(filteredOptions, (o) => {
79
+ return typeof o.props.children === 'string' ? o.props.children.toLowerCase() : o.props.children.join('').toLowerCase();
80
+ });
79
81
  val && setValue(String(val));
80
82
  setOptionValues(currentValues);
81
83
  }, [filteredOptions, val]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
- "version": "8.5.0",
3
+ "version": "8.6.0",
4
4
  "description": "UI components from Wonderflow's Wanda design system",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",