Closed onechiporenko closed 6 years ago
@onechiporenko I just attempted to upgrade to 2.15 and see why this issue was created.
Do you know what in 2.15 broke this add-on? I'd like to help if possible but at the moment there isn't a clear error indicating where this add-on is failing.
What I am seeing is empty rows in the table and an error being thrown on click.
ember-metal.js:3988 TypeError: Cannot read property 'get' of undefined
at Class.onRowSelect (route.js:171)
at Router$1.triggerEvent (router.js:1017)
at trigger (router.js:111)
at Router$1.trigger (router.js:1699)
at Class.send (router.js:327)
at Class.send (action_handler.js:42)
at Class.triggerAction (target_action_support.js:89)
at Class.sendAction (action_support.js:115)
at Class.clickOnRow (component.js:44)
at Class.send (action_support.js:129)
@onechiporenko Adding the following issue so it can be tracked. I believe this is related to the breakage of this add-on in 2.15.
Hi, @steverhoades. Something become broken with partials on Ember-2.15. Since Ember core-devs recommended to not use partials and move to the contextual components I have to do this too. Branch v2.0 (https://github.com/onechiporenko/ember-models-table/tree/v2.0) contains new version of ember-models-table
. It's not published yet, but i'm working on it.
I now it is still WIP, but may I recommend that you nest the components? I think that would make it easier to grasp & to override it.
E.g.:
components/models-table.js components/models-table/select.js components/models-table/footer.js components/models-table/row.js ...
You can use these nested components normally in the template, e.g. {{models-table/row}}
.
@mydea, thanks. I think I'll do as you said. It's a good idea!
2.0
is big major release with great changes, so fill free to propose/ask/recommend :)
Awesome! Is there a place for recommendations etc, or should I just put them here? I would also be up to help out if there is anything you'd need help with - ember-models-table is an integral part of our products, so I'm happy to give back :)
Yes, you may put it here.
I would also be up to help out if there is anything you'd need help with
Thanks! For now I need a "fresh outlook" (IDK, if it's a correct translation from "свежий взгляд со стороны").
"Coding part" contains next items:
ember-cli-mirage
and ember-cli-page-object
)server-paginated
table too)ember-models-table is an integral part of our products, so I'm happy to give back :)
I'm really glad that ember-models-table
is useful for your products :)
The discussion here has left me a little confused. Glad to see 2.0 is coming along :-D
But, is version 1.x going to be updated to support Ember >= 2.15?
@Ramblurr, upgrading 1.x means that some partials (IDK all partials or only a part of them) should be combined into one template. As for now, it's not a problem with addon itself. Yes, I've used not best practice with partials instead of components, but partials are supported currently and are not deprecated officially. Some error happens with Ember (or Glimmer or any other lib). I believe that bug emberjs/ember.js#15621 will be fixed and v1.x will continue work correctly.
Good to hear! I didn't realize this was caused by a bug in Ember rather than a deprecation/change. Thanks @onechiporenko
v2.0.0-alpha.1 is released. It's a pre-release for anyone who wants to test new design and help to improve it.
Run ember ember-cli-yuidoc
to build docs
-dir
Hey, first of all thanks for a great addon! When using Ember 2.15 with v2.0.0-alpha.1
branch, the column template
functionality is not working (the cells are now blank). propertyName
cells are still showing up correctly.
Keep up the good work!
@DennisNygren, main idea for version 2. is replace templates (partials) with contextual and "normal" components. So, upgrade to version 2. requires refactoring. Some migration docs will be prepared later. For now - just replace partials with components.
v2.0.0-beta.1
is released.
@onechiporenko Ok thanks for your quick reply!
Great work so far!
Is there a particular reason not to pass table=this
to a componentForFilterCell
anymore?
That used to be the case before and I relied on it (on accessing processedColumns
in particular) to implement filter options dependent on another filter (subcategory <- main category).
@arnebit, componentForFilterCell
receives several properties (see https://github.com/onechiporenko/ember-models-table/blob/v2.0/addon/templates/components/models-table/row-filtering.hbs#L16). Let me know if something more is needed.
Passing table=this
is a bad practice that I shouldn't use before (but I did :cry:)
v2.0.0-beta.2
is released.
Separated issue is created https://github.com/onechiporenko/ember-models-table/issues/254
=========== edited by @onechiporenko
@onechiporenko Why is passing table=this
bad? Because it would give the user...flexibility? ;-)
The aforementioned processedColumns
aside, looking for table.
in my project, I find I am also accessing/using
sort
action andfilteredContent
,
to implement a "toggle flag on all visible items" (to solve a problem similar to #214, it seems).Check new demo page for v.2 http://onechiporenko.github.io/ember-models-table/v.2/
v2.0.0-beta.3
is released.
I am using ember-model-table 2.0beta after the issue came up with "partials" in ember 2.15.I want to know if there is an option to customize the pagination in 2.0 such as "componentFooterTemplate" in 1.0? Pls help as it affects my app in production.
@SakuDivya, sure. You may override models-table/footer or use block content like:
{{#models-table data=data columns=columns as |mt|}}
{{#mt.footer as |footer|}}
{{! custom markup here }}
{{/mt.footer}}
{{/models-table}}
Thanks for the quick reply. But if want pagination functionalities and only need to change the UI lookup of page numbers,what needs to be done.Do i have to write a separate component and write all functionalities instead of {{footer.pagination-numeric}} ?
@SakuDivya, pls create a separated issue. This one is like a "news-board" for 2.x.
I have created.Pls take a look Thank u...
Looking really good, thanks for all the hard work @onechiporenko !
v2.0.0
is released.
models-table
to use contextual componentsember-cli-mirage
andember-cli-page-object
)server-paginated
table too)