This PR adds the IConditionalOutputComponent type, which influences how the renderer will generate/write markup to the output during a request.
Here are the rules:
If a component does NOT implement IConditionalOutputComponent, nor any of its parents, it will always generate markup.
If a component does NOT implement IConditionalOutputComponent, but a parent component does, then it's closest parent decides whether or not to generate markup.
If a component implements IConditionalOutputComponent, it decides whether or not it should generate markup. It may also decide this for it's children, if they do not implement IConditionalOutputComponent.
This PR also includes a few changes to the default behavior of Htmxor:
If a component does not include a @attribute [HxLayout(typeof(MyOwnHxLayout)], then it will be assigned the HtmxorLayoutComponentBase by default. This component does NOT generate any markup IF it has one or more children that has implements IConditionalOutputComponent.
This PR adds the
IConditionalOutputComponent
type, which influences how the renderer will generate/write markup to the output during a request.Here are the rules:
IConditionalOutputComponent
, nor any of its parents, it will always generate markup.IConditionalOutputComponent
, but a parent component does, then it's closest parent decides whether or not to generate markup.IConditionalOutputComponent
, it decides whether or not it should generate markup. It may also decide this for it's children, if they do not implementIConditionalOutputComponent
.This PR also includes a few changes to the default behavior of Htmxor:
@attribute [HxLayout(typeof(MyOwnHxLayout)]
, then it will be assigned theHtmxorLayoutComponentBase
by default. This component does NOT generate any markup IF it has one or more children that has implementsIConditionalOutputComponent
.