Skip to content

Commit

Permalink
fix(create-type): header and Indexes shoud be invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Sep 26, 2024
1 parent f6c7be1 commit ed6c059
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ export const Editor = ({
return undefined
}, [selectedSchema, attributes])

const parentType = selectedSchema ? selectedSchema.type : parent

return (
<Flex>
<HeaderRow>
Expand Down Expand Up @@ -543,25 +545,24 @@ export const Editor = ({
</>
)}
</Flex>
<CreateCustomNodeAttribute
onDelete={handleDeleteAttribute}
parent={selectedSchema ? selectedSchema.type : parent}
/>
{parentType && <CreateCustomNodeAttribute onDelete={handleDeleteAttribute} parent={parentType} />}
<MediaOptions initialOptions={mediaOptions} setMediaOptions={setMediaOptions} />
<Flex>
<LineBar />
<Flex mb={12} mt={12}>
<Text>Indexes</Text>
{parentType && (
<Flex>
<LineBar />
<Flex mb={12} mt={12}>
<Text>Indexes</Text>
</Flex>
<Grid item mb={2} width="70%">
<AutoComplete
onSelect={(val) => setValue('selectedIndex', val?.value || '')}
options={attributes.map((attr) => ({ label: attr.key, value: attr.key }))}
selectedValue={resolvedSelectedIndexValue}
/>
</Grid>
<LineBar />
</Flex>
<Grid item mb={2} width="70%">
<AutoComplete
onSelect={(val) => setValue('selectedIndex', val?.value || '')}
options={attributes.map((attr) => ({ label: attr.key, value: attr.key }))}
selectedValue={resolvedSelectedIndexValue}
/>
</Grid>
<LineBar />
</Flex>
)}
<Flex direction="row" justify="space-between" mt={20}>
{selectedSchema && (
<Flex direction="column">
Expand Down Expand Up @@ -607,7 +608,7 @@ export const Editor = ({
}

const CustomButton = styled(Button)`
width: 100% !important;
width: 400px !important;
margin: 0 auto !important;
`

Expand Down

0 comments on commit ed6c059

Please sign in to comment.