mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 10:45:27 +00:00
Fixes wrong edit and stream previews playing when filtering.
Include dependencies in useCallback for onEdit and onDelete, and update dependency array in StreamsTable for useTable
This commit is contained in:
parent
2fff015206
commit
3b4edde90f
1 changed files with 3 additions and 3 deletions
|
|
@ -82,11 +82,11 @@ const StreamRowActions = ({
|
|||
|
||||
const onEdit = useCallback(() => {
|
||||
editStream(row.original);
|
||||
}, []);
|
||||
}, [row.original.id, editStream]);
|
||||
|
||||
const onDelete = useCallback(() => {
|
||||
deleteStream(row.original.id);
|
||||
}, []);
|
||||
}, [row.original.id, deleteStream]);
|
||||
|
||||
const onPreview = useCallback(() => {
|
||||
console.log('Previewing stream:', row.original.name, 'ID:', row.original.id, 'Hash:', row.original.stream_hash);
|
||||
|
|
@ -543,7 +543,7 @@ const StreamsTable = ({ }) => {
|
|||
);
|
||||
}
|
||||
},
|
||||
[selectedChannelIds, channelSelectionStreams]
|
||||
[selectedChannelIds, channelSelectionStreams, theme, editStream, deleteStream, handleWatchStream]
|
||||
);
|
||||
|
||||
const table = useTable({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue