Proposal: Remove 'focusedId' from computed 'days' as dependency
See original GitHub issueHey, 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:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Just a quick sidenote.
onfocus
doens’t work in Safari and FF on OSX. Discovered it today the hard way.