question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Remove 'focusedId' from computed 'days' as dependency

See original GitHub issue

Hey, thanks for amazing work first of all.

I’m building an add-on for highlighting the current selection before user actually selecting it.

And stumbled upon re-computing days properties on each click, which actually happens with onFocusDay and onBlurDay events. From my opinion this looks inefficient and un-intuitive.

Would you be interested to just to update isFocused property for the corresponding day instead of re-computing days property? I can do PR.

e.g.

  _updateFocused(id, isFocused = true) {
    const day = this.get('days').findBy('id', id);
    day.set('isFocused', isFocused);
    this.set('focusedId', isFocused ? id : null);
  },

UPD: buildDay should return an Ember.Object at this case.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cibernoxcommented, May 16, 2017

It’s more the opposite. Why have ember objects if you don’t have to? I stick to POJOs as much as I can. Also with the plan to migrate the addon to glimmer as soon as they are interoperable.

0reactions
jozefvaclavikcommented, Jun 9, 2018

Just a quick sidenote. onfocus doens’t work in Safari and FF on OSX. Discovered it today the hard way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem while building months-component · Issue #116 - GitHub
The issue is, that if user clicks a not-focused-month, the focus event is fired and the month get focused. However the click event...
Read more >
Uniloc USA, Inc. v. HTC Am., Inc. - Casetext
The rest of the claims Uniloc asserts are dependent claims: ... infringement "by failing to remove or distinguish infringing features" of the smartphones....
Read more >
S.C et al v. The Katonah-Lewisboro Central School District, No ...
Plaintiffs are to provide the Court, by letter, with a proposed judgment reflecting ... the reimbursement amounts, within 14 days of this Opinion...
Read more >
Confined Spaces in Construction - Federal Register
OSHA removed the “Introduction” section to make this final rule similar ... In contrast, the scope of the proposed rule focused on employers ......
Read more >
Maltreated Children's Understanding of and Emotional ... - NCBI
If children are removed from their parents' custody, the courts must further ... that listed all children scheduled to appear in dependency court...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found