Git Product home page Git Product logo

Comments (6)

mkszepp avatar mkszepp commented on May 24, 2024 1

@rogeraraujo90 if you want you can add a PR for your requests

from ember-power-select.

mkszepp avatar mkszepp commented on May 24, 2024

Hi @rogeraraujo90 thanks for reporting...

Can you provide an example in which case it dosn't match? So we can add a test and fix it.

from ember-power-select.

rogeraraujo90 avatar rogeraraujo90 commented on May 24, 2024

Hi @mkszepp, I have group options like that:

class TimePickerOption {
  constructor(group, value) {
    this.group = group;
    this.value = value;
  }

  isEqual(other) {
    return this.group === other?.group && this.value === other?.value;
  }
}

const options = [{
  groupName: "period",
    options: [
      new TimePickerOption("Period", "AM" ),
      new TimePickerOption("Period", "PM" ),
    ]
}]

Given these options, if I try to highlight the option with the value "PM", the isEqual method is not called. Internally, we do the entry === option, which will always return false. If replacing by isEqual(entry, option), this would work.

I was trying to highlight the option by doing:

eps.actions.highlight(new TimePickerOption(PERIOD_GROUP, period));

Let me know if you need more info!

from ember-power-select.

rogeraraujo90 avatar rogeraraujo90 commented on May 24, 2024

Hey, just noticed that, due to a similar cause, the aria-current is not properly defined as "true". We need a logic similar what we have for aria-selected here.

from ember-power-select.

rogeraraujo90 avatar rogeraraujo90 commented on May 24, 2024

Let me know if I can help with the fix! I'm using EPS in a new feature in my project :)

from ember-power-select.

rogeraraujo90 avatar rogeraraujo90 commented on May 24, 2024

@rogeraraujo90 if you want you can add a PR for your requests

I just opened the PR!

from ember-power-select.

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.