q-data-table shows "Duplicate presence of slot" error



  • I’m trying to create a q-data-table with a column template I got an error :
    Duplicate presence of slot “col-mycol” found in the same render tree - this will likely cause render errors. (found in <QDataTable>)

            <q-data-table
                    :data="mainListData"
                    :config="mainListTableSettings.config"
                    :columns="mainListTableSettings.columns"
                    @refresh="reloadDataTable"
    
            >
                <template slot='col-mycol' slot-scope='cell'>
                    can be anything text here - error occurs anyhow
                </template>
            </q-data-table>
    

    I have already defined the column in the mainListTableSettings.columns as below.

                        {
                            label: 'MyCol',
                            field: 'mycol',
                            width: '200px',
                            style: {'text-align': 'center'}
                        }
    

    The mainListData does include a property ‘mycol’ in each row.

    Any ideas?



  • I’m using Quasar 0.14.7



  • updated vue.js to 2.5.13 and it’s solved. looks like the template engine has been changed in recent vue version.