Giter Club home page Giter Club logo

Comments (2)

Swaagie avatar Swaagie commented on July 20, 2024

Just tested and it seems to work fine, in this specific case you probably need new Minimize({ empty: true, spare: true });. empty will make sure the value attribute is added , e.g. <option value> and spare will add "" making sure the value attribute keeps it empty value <option value="">. Having just empty: true might cause the browser to optimize the attribute away, cause normally value is not a boolean attribute.

To make sure this is not some edge case bug, what version of minimize are you working with and what browser are you working on?

from minimize.

canebat avatar canebat commented on July 20, 2024

Adding spare: true like you suggested worked for me.

I'm using chrome, minimize 1.4.1.

My html is actually using angularjs:

<select  ng-model="item">
    <option value="">Select something</option>
    <option ng-repeat="i in items" ng-selected ="item == i.name>{{ i.name }}<option>
</select>

from minimize.

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.