GithubHelp home page GithubHelp logo

Comments (10)

Luddinus avatar Luddinus commented on August 28, 2024

up

from angular-formly-templates-bootstrap.

kentcdodds avatar kentcdodds commented on August 28, 2024

I think we could probably update the template for the select type to support this. Something like this should do it:

const template = `
  <select class="form-control" ng-model="model[options.key]">
    <option ng-hide="to.notNull" value="">{{to.nullDisplay}}</option>
  </select>
`;

If you'd like to create a Pull Request to add this functionality that would be cool.

I'd also like the apiCheck definition to be updated to add the two new properties notNull is a boolean and nullDisplay is a string.

Also, adding these new properties to the README.md would be great too.

from angular-formly-templates-bootstrap.

kentcdodds avatar kentcdodds commented on August 28, 2024

Oh, and once it's been released, creating a new example would also be helpful

from angular-formly-templates-bootstrap.

Luddinus avatar Luddinus commented on August 28, 2024

I guess would be better to set "nullable" instead of "notNull", and "nullableDisplay" instead of "nullDisplay"

from angular-formly-templates-bootstrap.

Luddinus avatar Luddinus commented on August 28, 2024

I don't know how to put the examples, but this could be:

http://jsbin.com/kotacog/1/edit?js,output

from angular-formly-templates-bootstrap.

kentcdodds avatar kentcdodds commented on August 28, 2024

Did you see my comments on your pull requests? Could you it again? And I'd prefer it all to be in a single commit (rather than two)

from angular-formly-templates-bootstrap.

Luddinus avatar Luddinus commented on August 28, 2024

@kentcdodds I'll check, I'm not use to pull requests etc. sorry

from angular-formly-templates-bootstrap.

kentcdodds avatar kentcdodds commented on August 28, 2024

You're fine! I'm actually an egghead.io author and will be making a series
on contributing to open source projects because it's hard for new comers.

On Thu, Nov 5, 2015, 10:03 AM Luddinus [email protected] wrote:

@kentcdodds https://github.com/kentcdodds I'll check, I'm not use to
pull requests etc. sorry


Reply to this email directly or view it on GitHub
#67 (comment)
.

from angular-formly-templates-bootstrap.

OskarPersson avatar OskarPersson commented on August 28, 2024

A combination of #68 and #69 has been created in #111 and is waiting for response.

from angular-formly-templates-bootstrap.

shmert avatar shmert commented on August 28, 2024

I've found that if your model object property is undefined the select will choose the last item. If it's null you'll get an empty

from angular-formly-templates-bootstrap.

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.