Skip to content

Commit

Permalink
fix(blue-print): newly Added Attributes Only Visible
Browse files Browse the repository at this point in the history
  • Loading branch information
MirzaHanan committed Sep 20, 2024
1 parent b2110e0 commit 1c1a3fc
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ export const Editor = ({
const attributesValue = watch('attributes')

const attributes: Attribute[] = useMemo(
() =>
isAttributeArray(attributesValue) ? attributesValue.filter((attr) => attr.key && attr.key.trim() !== '') : [],
() => (isAttributeArray(attributesValue) ? attributesValue : []),
[attributesValue],
)

Expand Down Expand Up @@ -515,7 +514,7 @@ export const Editor = ({
<Grid item mb={2} width="70%">
<AutoComplete
onSelect={(val) => setValue(`selectedIndex`, val?.value)}
options={attributes.map((attr) => ({ label: attr.key, value: attr.key }))}
options={attributes.filter((attr) => attr.key).map((attr) => ({ label: attr.key, value: attr.key }))}
/>
</Grid>
<LineBar />
Expand Down

0 comments on commit 1c1a3fc

Please sign in to comment.