dmed-voice-assistant 1.2.14 → 1.2.15
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.
@@ -60,7 +60,7 @@ const RecordListItem = _ref => {
|
|
60
60
|
const openAnchorEl = Boolean(anchorEl);
|
61
61
|
const [isPlaying, setIsPlaying] = (0, _react.useState)(false);
|
62
62
|
const [isEditing, setIsEditing] = (0, _react.useState)(false);
|
63
|
-
const [newLabel, setNewLabel] = (0, _react.useState)(
|
63
|
+
const [newLabel, setNewLabel] = (0, _react.useState)("");
|
64
64
|
const handlePopoverOpen = event => {
|
65
65
|
setAnchorEl(event.currentTarget);
|
66
66
|
};
|
@@ -111,6 +111,9 @@ const RecordListItem = _ref => {
|
|
111
111
|
}
|
112
112
|
handlePopoverClose();
|
113
113
|
};
|
114
|
+
(0, _react.useEffect)(() => {
|
115
|
+
setNewLabel(label);
|
116
|
+
}, [label]);
|
114
117
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
115
118
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
116
119
|
className: "flex items-center justify-between",
|
package/dist/recorder.js
CHANGED
@@ -151,10 +151,11 @@ const RecorderBox = _ref => {
|
|
151
151
|
}
|
152
152
|
};
|
153
153
|
const handleDelete = id => {
|
154
|
-
setRecordList(
|
154
|
+
// setRecordList((prevList) => prevList.filter((record) => record.union_id !== id));
|
155
|
+
|
155
156
|
if (onRecordDeleteEvent) {
|
156
157
|
onRecordDeleteEvent({
|
157
|
-
id:
|
158
|
+
id: id
|
158
159
|
});
|
159
160
|
}
|
160
161
|
};
|
@@ -198,7 +199,7 @@ const RecorderBox = _ref => {
|
|
198
199
|
fetchAudioInputDevices();
|
199
200
|
}, []);
|
200
201
|
(0, _react.useEffect)(() => {
|
201
|
-
setRecordList(recordHistoryList);
|
202
|
+
setRecordList([...recordHistoryList]);
|
202
203
|
}, [recordHistoryList]);
|
203
204
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
204
205
|
className: "bg-[#0B0B0B] rounded-[5px] border p-[20px] w-[850px]",
|
@@ -590,7 +591,7 @@ const RecorderBox = _ref => {
|
|
590
591
|
time: parseInt(record.voice_duration),
|
591
592
|
createdDate: record.date,
|
592
593
|
onLabelChange: newLabel => handleLabelChange(index, newLabel),
|
593
|
-
onDelete: () => handleDelete(
|
594
|
+
onDelete: () => handleDelete(record.union_id)
|
594
595
|
}, index);
|
595
596
|
})
|
596
597
|
})]
|