diff --git a/client/js/templates/Source.jsx b/client/js/templates/Source.jsx
index c91275d12e..359187462a 100644
--- a/client/js/templates/Source.jsx
+++ b/client/js/templates/Source.jsx
@@ -317,6 +317,11 @@ function SourceEditForm({
[updateEditedSource]
);
+ const iconOnChange = useCallback(
+ (event) => updateEditedSource({ icon: event.target.value }),
+ [updateEditedSource]
+ );
+
const spoutOnChange = useCallback(
(event) =>
handleSpoutChange({
@@ -370,6 +375,22 @@ function SourceEditForm({
const _ = useContext(LocalizationContext);
+ const [showAdvanced, setShowAdvanced] = useState(false);
+ const [filterUsed, setFilterUsed] = useState(source.filter !== '');
+ // TODO: Remove undefined check once we implement it server side.
+ const [iconUsed, setIconUsed] = useState(source.icon !== '' && source.icon !== undefined);
+
+ const toggleShowAdvanced = useCallback(
+ () => {
+ setShowAdvanced((advanced) => !advanced);
+ console.log(source.filter);
+ setFilterUsed(source.filter !== '');
+ // TODO: Remove undefined check once we implement it server side.
+ setIconUsed(source.icon !== '' && source.icon !== undefined);
+ },
+ [source.filter, source.icon]
+ );
+
const sourceParamsContent = (
sourceParamsLoading ? (