refactor: extract options per view

This commit is contained in:
Carlos Valente
2024-07-09 09:23:21 +02:00
committed by Carlos Valente
parent 2877475a35
commit ce4a48cd8d
23 changed files with 675 additions and 532 deletions
@@ -27,6 +27,10 @@ export default function ParamInput(props: EditFormInputProps) {
const { paramField } = props;
const { id, type, defaultValue } = paramField;
if (type === 'persist') {
return null;
}
if (type === 'option') {
const optionFromParams = searchParams.get(id);
const defaultOptionValue = optionFromParams || defaultValue;