@sikka/hawa 0.1.90 → 0.1.91

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": "@sikka/hawa",
3
- "version": "0.1.90",
3
+ "version": "0.1.91",
4
4
  "description": "Modern UI Kit made with Tailwind & Radix Primitives",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -315,7 +315,9 @@ export const DropdownMenu: React.FC<DropdownMenuProps> = ({
315
315
  className="flex flex-row gap-2"
316
316
  onSelect={() => {
317
317
  subitem.action()
318
- selectCallback(subitem.value)
318
+ if (selectCallback) {
319
+ selectCallback(subitem.value)
320
+ }
319
321
  }}
320
322
  key={subIndex}
321
323
  >
@@ -337,9 +339,13 @@ export const DropdownMenu: React.FC<DropdownMenuProps> = ({
337
339
  }
338
340
  if (item.action) {
339
341
  item.action()
340
- selectCallback(item.value)
342
+ if (selectCallback) {
343
+ selectCallback(item.value)
344
+ }
341
345
  } else {
342
- selectCallback(item.value)
346
+ if (selectCallback) {
347
+ selectCallback(item.value)
348
+ }
343
349
  }
344
350
  }}
345
351
  end={item.end}