Skip to content

Sorting by EDA value #1354

@fatalwir

Description

@fatalwir

Hello,

It would be very useful if the EDA value column could sort values by parsing them as numbers instead of strings when they follow formats commonly used for resistors, capacitors, and inductors. This would ensure that values are sorted according to their actual magnitude. Only values that do not match the expected format should fall back to string-based sorting (since non-RLC components may use arbitrary text values).

As an example, I have a category called Resistors. In this category I have components with the following EDA values using the currently implemented sorting:

  1. 0R
  2. 100R
  3. 1R2
  4. 2k2
  5. 120R

However, the correct numerical order should be:

  1. 0R
  2. 1R2
  3. 100R
  4. 120R
  5. 2k2

Here is a brief specification of the expected format:

  • Recognize standard SI prefixes across components: f, p, n, µ/u, m, (none), k, M, G
  • Support formats with embedded decimal mark (RKM notation): 0R, 1R2, 4k7, 2M2, 100n, 22p where the letter acts as a decimal separator.
  • Accept both k and K, m and M (with correct distinction: m = milli, M = mega).
  • Accept standard decimal forms (dot or comma) alongside RKM: 1.2k; 0.1u; 10,0.
  • Accept optional unit suffixes like: 100nF, 10kΩ, 1uH.
  • Ignore spaces.

Thank you for considering this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions