Filter Product Collection by Child product attribute

There are additional cases where the first band can be black besides the wire or jumper case. I have some .100 ohm resistors and some .050 ohm resistors that are coded with a black first band. Otherwise, how would you code them?

Blk, Brn, Blk, Ag, Brn = 010/100 1% = .10

Blk, Grn, Blk, Wht, Brn = 050/1000 1% = .050 +/- 500 uOhms

Probably whoever coded these decided the 10^9 multiplier was unneeded and made this up. After all, how often do you see a 100 Gohm resistor?

These probably came from Ohmite, as the picture on their site is identical to the resistors that I have, including the color code.


I contacted Salesforce developer support, who after many weeks and escalations, finally said there was no supported way to build out this native behavior.

Instead, you can just use the Salesforce Lightning Design System's CSS to create the right styles, then add in the interactivity and switching between active editing and read only on your own. https://www.lightningdesignsystem.com/components/panels/#flavor-detail-panel-form-edit-mode

You can do this with the framework of your choice such as React, Angular, Lightning Component, or plain JS. Personally, I've built this out on Backbone Marionette with backbone.stickit for two-way data binding and Dust.js for templating, but anything will do.

If you build out the components on your own, I highly recommend creating partials for each component - with the necessary parameters. This hides the huge amount of markup to make each component. I've done this via Dust, but choose whatever templating language you want.

Alternatively, check out http://aljs.appiphony.com/ or https://lightningdart.com/ for ready to use libraries. Between their flexibility, completeness, and licenses, I found it easier to go out on my own.