@sikka/hawa 0.1.89 → 0.1.90
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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/elements/DropdownMenu.tsx +12 -2
- package/src/elements/HawaTable.tsx +4 -1
package/dist/index.mjs
CHANGED
|
@@ -1158,6 +1158,7 @@ var DropdownMenu = ({
|
|
|
1158
1158
|
triggerClassname,
|
|
1159
1159
|
align,
|
|
1160
1160
|
alignOffset,
|
|
1161
|
+
selectCallback,
|
|
1161
1162
|
width = "default"
|
|
1162
1163
|
}) => {
|
|
1163
1164
|
const widthStyles2 = {
|
|
@@ -1181,7 +1182,10 @@ var DropdownMenu = ({
|
|
|
1181
1182
|
{
|
|
1182
1183
|
disabled: subitem.disabled,
|
|
1183
1184
|
className: "flex flex-row gap-2",
|
|
1184
|
-
onSelect: () =>
|
|
1185
|
+
onSelect: () => {
|
|
1186
|
+
subitem.action();
|
|
1187
|
+
selectCallback(subitem.value);
|
|
1188
|
+
},
|
|
1185
1189
|
key: subIndex
|
|
1186
1190
|
},
|
|
1187
1191
|
subitem.icon && subitem.icon,
|
|
@@ -1196,7 +1200,12 @@ var DropdownMenu = ({
|
|
|
1196
1200
|
if (item.presist) {
|
|
1197
1201
|
e.preventDefault();
|
|
1198
1202
|
}
|
|
1199
|
-
item.action
|
|
1203
|
+
if (item.action) {
|
|
1204
|
+
item.action();
|
|
1205
|
+
selectCallback(item.value);
|
|
1206
|
+
} else {
|
|
1207
|
+
selectCallback(item.value);
|
|
1208
|
+
}
|
|
1200
1209
|
},
|
|
1201
1210
|
end: item.end
|
|
1202
1211
|
},
|
|
@@ -1437,6 +1446,7 @@ var HawaTable = ({
|
|
|
1437
1446
|
direction,
|
|
1438
1447
|
side: "right",
|
|
1439
1448
|
items: props.actions,
|
|
1449
|
+
selectCallback: (e) => props.handleActionClick(e, singleRow),
|
|
1440
1450
|
trigger: /* @__PURE__ */ React20.createElement("div", { className: "flex w-fit cursor-pointer items-center justify-center rounded p-2 hover:bg-gray-200 dark:hover:bg-gray-600" }, /* @__PURE__ */ React20.createElement(
|
|
1441
1451
|
"svg",
|
|
1442
1452
|
{
|