miguelcobain / ember-yeti-table

Yeti Table

Home Page:https://miguelcobain.github.io/ember-yeti-table

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using table.tfoot fails because of deprecated deprecated module in Ember.js 4.1

Finn10111 opened this issue · comments

I am using Ember.js 4.1 and I am not quite sure about the support of Ember.js 4.x. Because I wanted to use pagination I added a footer to the table, so my template looks like this:

<YetiTable @data={{this.model}} @pagination={{true}} @pageSize={{10}} @theme={{hash table="table"}} as |table|>
<table.header as |header|>
  <header.column @prop="name">
    Name
  </header.column>
  <header.column @prop="place">
    Place 
  </header.column>
  <header.column @prop="createdAt">
    Created at
  </header.column>
</table.header>

<table.body/>

<table.tfoot as |foot|>
  <foot.row as |row|>
    <row.cell @visible={{true}} colspan={{table.visibleColumns.length}}>
      <table.pagination/>
    </row.cell>
  </foot.row>
</table.tfoot>

</YetiTable>

But then I get this error:

Uncaught (in promise) Error: Could not find module `@ember/application/deprecations` imported from `ember-yeti-table/components/yeti-table/tfoot/component`

While doing a quick research I found this about the deprecated module which has been removed in 4.x: https://deprecations.emberjs.com/v3.x/

When I change the tfoot component to use this

import { deprecate } from '@ember/debug'

insted of

import { deprecate } from '@ember/application/deprecations';

it works.

Also I saw it already got changed for the thead component but I am really new to Yeti Table (thank btw!) so I am not sure what to do.

This should be fixed on release 1.7.3. Please reopen issue if problem still persists. Thanks for reporting!