Git Product home page Git Product logo

Comments (5)

ctron avatar ctron commented on July 21, 2024 1

I assume it worked for you, so I will close the issue. If that's not the case, let me know and we can re-open it.

from patternfly-yew.

ctron avatar ctron commented on July 21, 2024

So, Select requires a SelectOption or SelectGroup, you seem to be passing in a select (which is the "standard" HTML select element. Either of them can be "intoed" into SelectChildVariant.

The commented out code should work: https://ctron.github.io/patternfly-yew-quickstart/component/select

Also, when you collect it the way you did, it will end up as Html, which also isn't compatible with SelectChildVariant. You can however use html_nested! to use the actual type. Note that this however extracts only the type of the root element. So if you want to have more than one prepare in a collection, you need to collect a Vec of html_nested! calls.

from patternfly-yew.

collinsmarra avatar collinsmarra commented on July 21, 2024

I realized that, but still when it is <SelectOption<String> value={brand}> instead of select in the loop, I still get the same error. "the trait From<VNode> is not implemented for SelectChildVariant<std::string::String>".
Maybe it is because of how I am collecting.
What would you recommend?

from patternfly-yew.

ctron avatar ctron commented on July 21, 2024

I would do it like this: https://github.com/seedwing-io/seedwing-policy/blob/3640ae2985c2b5d8b1d2ef00d83c5662ac363315/frontend/src/pages/policy/mod.rs#L473-L484

from patternfly-yew.

collinsmarra avatar collinsmarra commented on July 21, 2024

Thank you

from patternfly-yew.

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.