Giter VIP home page Giter VIP logo

Comments (3)

yoli799480165 avatar yoli799480165 commented on May 19, 2024 2

Conflict with the html tag. not a bug of antd-blazor. you can fix like this:

    <Row Gutter="24">
        <AntDesign.Col Span="12">
            <h1>test1</h1>
        </AntDesign.Col>
        <AntDesign.Col Span="12">
            <h1>test2</h1>
        </AntDesign.Col>
    </Row>

from ant-design-blazor.

ElderJames avatar ElderJames commented on May 19, 2024 1

Use <Antdesign.Col> to workaround.

from ant-design-blazor.

kwinkel avatar kwinkel commented on May 19, 2024

I'm not sure what the original issue description is, but I'm pretty sure its the same problem.

@ElderJames, this bug prevents using components with scopes. Sample:

@if (SomeCondition == null)
{
    <Row>
        <Col>        
            <Text>Test</Text>
        </Col>
    </Row>
}

compiler error Found a malformed 'Col' tag helper. Tag helpers must have a start and end tag or be self closing.


Workaround: set a RenderFragment variable and add it to self-closing Col component like this:

<Col ChildContent=@myRenderFragment />

@code
{
  private RenderFragment _myRenderFragment;

  protected override void OnInitialized()
  {
    _myRenderFragment = @<Text>my text</Text>;
  }
}

from ant-design-blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.