Replies: 4 comments
-
@beolafsen I assume you want to control the visibility of a section within your module component based on some sort of custom logic or boolean value. It is obviously already possible to hide/show sections using the following syntax:
and you are requesting to be able to do something like this instead:
Are you simply trying to avoid writing conditional logic in your module components? I am trying to understand the use case. |
Beta Was this translation helpful? Give feedback.
-
Hi!
Yes – you're right. My logic today is how you describe :
@if (IsVisible)
{
<Section Name="Name">
...
</Section>
}
.
I have about 10-15 of them in succession and I guess I like the syntac
better when the IF logic is put in the component.
Not a big problem, but I like it better.
I have already made a copy of your Section component - so it's not a big
deal.
Nearly all my components have this IsVisible parameter - so I guess I like
it better. :-)
Best regards
Bjørn-Even Olafsen
tor. 30. nov. 2023 kl. 21:23 skrev Shaun Walker ***@***.***>:
… @beolafsen <https://github.com/beolafsen> I assume you want to control
the visibility of a section within your module component based on some sort
of custom logic or boolean value. It is obviously already possible to
hide/show sections using the following syntax:
@if (IsVisible)
{
<Section Name="Name">
...
</Section>
}
and you are requesting to be able to do something like this instead:
<Section Name="Name" ***@***.***">
...
</Section>
Are you simply trying to avoid writing conditional logic in your module
components? I am trying to understand the rationale...
—
Reply to this email directly, view it on GitHub
<#3520 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASKGXBVB36KPFZJJBUX7NVLYHDTMDAVCNFSM6AAAAABAATXFICVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOMRSGA3DM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
@beolafsen I can see the benefit of easier to read/maintain code... please go ahead and submit the PR |
Beta Was this translation helpful? Give feedback.
-
Great - I have done that.
It's my first contribution so give me a hint if I have done something wrong.
Best regards
Bjørn-Even Olafsen
tor. 30. nov. 2023 kl. 23:20 skrev Shaun Walker ***@***.***>:
… @beolafsen <https://github.com/beolafsen> I can see the benefit of easier
to read/maintain code... please go ahead and submit the PR
—
Reply to this email directly, view it on GitHub
<#3520 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASKGXBT2H2XPX7AD67GIJFLYHEBDDAVCNFSM6AAAAABAATXFICVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOMRSHA4TS>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi!
Would it be posible to extend the "Section" component with a "IsVisible" parameter?
I can make my own Section but if it is usefull for others it is maybe possible to add it into existing component?
[Parameter]
public bool IsVisible { get; set; } = true;
Beta Was this translation helpful? Give feedback.
All reactions