Skip to content
Snippets Groups Projects
Commit b3b52d87 authored by deep1401's avatar deep1401
Browse files

Rename docsArray to defaultValue

parent 0f144dca
No related branches found
No related tags found
No related merge requests found
...@@ -328,7 +328,7 @@ export default function GenerateModal({ ...@@ -328,7 +328,7 @@ export default function GenerateModal({
<PickADocumentMenu <PickADocumentMenu
experimentInfo={experimentInfo} experimentInfo={experimentInfo}
showFoldersOnly={false} showFoldersOnly={false}
docsArray={config.docs? config.docs : []} defaultValue={config.docs? config.docs : []}
name="docs" name="docs"
/> />
<FormHelperText>Select documents to upload</FormHelperText> <FormHelperText>Select documents to upload</FormHelperText>
......
...@@ -7,7 +7,7 @@ const fetcher = (url) => fetch(url).then((res) => res.json()); ...@@ -7,7 +7,7 @@ const fetcher = (url) => fetch(url).then((res) => res.json());
export default function PickADocumentMenu({ export default function PickADocumentMenu({
name, name,
experimentInfo, experimentInfo,
docsArray = [], defaultValue = [],
showFoldersOnly = false, showFoldersOnly = false,
}) { }) {
const { const {
...@@ -19,8 +19,8 @@ export default function PickADocumentMenu({ ...@@ -19,8 +19,8 @@ export default function PickADocumentMenu({
const [selected, setSelected] = useState([]); const [selected, setSelected] = useState([]);
useEffect(() => { useEffect(() => {
setSelected(docsArray || []); setSelected(defaultValue || []);
}, [docsArray]); }, [defaultValue]);
function handleChange(event, newValue) { function handleChange(event, newValue) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment