@archbase/components 3.0.13 → 3.0.14

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbase/components",
3
- "version": "3.0.13",
3
+ "version": "3.0.14",
4
4
  "description": "UI Components for Archbase React v3 - Form editors, data visualization, and business components",
5
5
  "author": "Edson Martins <edsonmartins2005@gmail.com>",
6
6
  "license": "MIT",
@@ -38,9 +38,9 @@
38
38
  "react-dom": "^18.3.0 || ^19.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@archbase/core": "3.0.13",
42
- "@archbase/data": "3.0.13",
43
- "@archbase/layout": "3.0.13",
41
+ "@archbase/core": "3.0.14",
42
+ "@archbase/data": "3.0.14",
43
+ "@archbase/layout": "3.0.14",
44
44
  "@gfazioli/mantine-list-view-table": "^1.1.9",
45
45
  "@gfazioli/mantine-onboarding-tour": "^2.6.5",
46
46
  "@mui/x-data-grid": "^7.28.3",
@@ -473,8 +473,10 @@ export function ArchbaseAsyncSelect<T, ID, O>({
473
473
  position={dropdownPosition}
474
474
  zIndex={zIndex}
475
475
  onOptionSubmit={(val) => {
476
- handleChange(val);
477
- handleSearchChange(getOptionLabel(val as O));
476
+ const selectedOption = options.find((opt) => opt.value === val);
477
+ const originalObject = selectedOption?.origin ?? val;
478
+ handleChange(originalObject);
479
+ setQueryValue(selectedOption?.label || '');
478
480
  combobox.closeDropdown();
479
481
  }}
480
482
  >
@@ -512,11 +514,8 @@ export function ArchbaseAsyncSelect<T, ID, O>({
512
514
  size="sm"
513
515
  onMouseDown={(event) => event.preventDefault()}
514
516
  onClick={() => {
517
+ handleChange(null);
515
518
  setQueryValue('');
516
- setSelectedValue(null);
517
- if(onSelectValue) {
518
- onSelectValue(null)
519
- }
520
519
  }}
521
520
  aria-label="Clear value"
522
521
  />