diff --git a/ui/src/playlist/PlaylistList.js b/ui/src/playlist/PlaylistList.js
index 71a8c75db..4b026fb64 100644
--- a/ui/src/playlist/PlaylistList.js
+++ b/ui/src/playlist/PlaylistList.js
@@ -82,6 +82,39 @@ const TogglePublicInput = ({ resource, source }) => {
)
}
+const ToggleAutoImport = ({ resource, source }) => {
+ const record = useRecordContext()
+ console.log(record)
+ const notify = useNotify()
+ const [ToggleAutoImport] = useUpdate(
+ resource,
+ record.id,
+ {
+ ...record,
+ sync: !record.sync,
+ },
+ {
+ undoable: false,
+ onFailure: (error) => {
+ console.log(error)
+ notify('ra.page.error', 'warning')
+ },
+ },
+ )
+ const handleClick = (e) => {
+ ToggleAutoImport()
+ e.stopPropagation()
+ }
+
+ return record.path ? (
+
+ ) : null
+}
+
const PlaylistListBulkActions = (props) => (
<>
@@ -107,6 +140,7 @@ const PlaylistList = (props) => {
),
comment: ,
+ sync: ,
}),
[isDesktop, isXsmall],
)