From 835e6fcee982d27bac9eeab768e1714bfc531aa5 Mon Sep 17 00:00:00 2001 From: bniwredyc Date: Thu, 11 May 2023 13:06:29 +0200 Subject: [PATCH] save topics fixes --- .../Editor/TopicSelect/TopicSelect.tsx | 4 +++ src/components/Views/Edit.tsx | 26 +++++++++-------- src/context/editor.tsx | 28 ++++++++++++++----- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/src/components/Editor/TopicSelect/TopicSelect.tsx b/src/components/Editor/TopicSelect/TopicSelect.tsx index b84984aa..ebab3d12 100644 --- a/src/components/Editor/TopicSelect/TopicSelect.tsx +++ b/src/components/Editor/TopicSelect/TopicSelect.tsx @@ -7,6 +7,7 @@ import styles from './TopicSelect.module.scss' import { clsx } from 'clsx' import { createSignal } from 'solid-js' import { slugify } from '../../../utils/slugify' +import { clone } from '../../../utils/clone' type TopicSelectProps = { topics: Topic[] @@ -64,10 +65,13 @@ export const TopicSelect = (props: TopicSelectProps) => { ) } + const initialValue = clone(props.selectedTopics) + return (