-
Notifications
You must be signed in to change notification settings - Fork 286
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
Tidy up data tab #1034
Tidy up data tab #1034
Conversation
67b2706
to
75ce722
Compare
@@ -1,8 +0,0 @@ | |||
import { computed } from '@ember/object'; | |||
import Component from '@ember/component'; | |||
export default Component.extend({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component is replaced with a simple comparison in the template: https://github.com/emberjs/ember-inspector/pull/1034/files?file-filters%5B%5D=.hbs&hide-deleted-files=true#diff-97c2c032aa308abb534f8894b734348eR18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome! Just a couple super minor requests, but overall looks very good! 👍
app/helpers/is-empty.js
Outdated
@@ -0,0 +1,8 @@ | |||
import { isEmpty } from '@ember/utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ember-truth-helpers already has an is-empty
helper. Can we use that one instead?
app/controllers/records.js
Outdated
return true; | ||
filteredRecords: computed('searchValue', 'model.@each.{columnValues,filterValues}', 'filterValue', function() { | ||
return this.model.filter((record) => { | ||
return this.passesFilter(record) && this.passesSearch(record); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic for passesFilter
and passesSearch
seems fairly simple. Would you be okay with not pulling out into separate functions and leaving inside the computed?
770ed63
to
88e1972
Compare
* Add is-empty helper * explicit this for data tab * Remove record-filter component * Tidy up Records controller * Revert some changes
No description provided.