Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more items indicator sometimes not appearing #1086

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

patricklx
Copy link
Collaborator

Also, put the length property at the top

@@ -6,10 +6,10 @@ import { A } from '@ember/array';
export default Component.extend({
tagName: '',

isArray: computed('properties', function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we leave this computed and switch it to 'properties.[] to ensure it updates?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I don't think it matters since it's only called once.

if (this.get('isArray') && this.get('sorted.length') > 100) {
let props = A(this.get('sorted'));
if (this.isArray()) {
const item = props.findBy('name', 'length');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to put the length property at the top, since otherwise it will be cutoff. Or it will look wierd at the end

@RobbieTheWagner
Copy link
Member

@patricklx any updates here? Would like to get this in if it's still needed.

@RobbieTheWagner
Copy link
Member

@patricklx do we still need these changes? If so, could you please rebase?

@RobbieTheWagner
Copy link
Member

@patricklx do we still need this PR?

@patricklx
Copy link
Collaborator Author

patricklx commented Oct 21, 2022

Yes, it's still needed. It also makes sure that array items receive updates

@RobbieTheWagner RobbieTheWagner merged commit 6853fac into emberjs:main Oct 21, 2022
@patricklx patricklx deleted the patch-2 branch October 22, 2022 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants