Vue-grid-layout: Shouldn't grid-item be a slot?

Created on 21 Feb 2020  路  9Comments  路  Source: jbaysolutions/vue-grid-layout

Whats the point of having both v-for="item in layout" for grid-item and :layout="layout" or :layout.sync="layout" for grid-layout?

Most helpful comment

You can try and modify the source to get it working with slots and submit a PR. I couldn't make it work.

All 9 comments

Anyone?

You can try and modify the source to get it working with slots and submit a PR. I couldn't make it work.

I'm unable to test my modifications

All works okay when I do yarn add vue-grid-layout but i get the following message in the browser when I do yarn add file:/{PATH}/vue-grid-layout after cloning it (even without adding my changes):

[Vue warn]: Unknown custom element: <grid-layout> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Here are the steps I took before running the code:

cd vue-grid-layout
npm install
npm run build-lib

cd .../test-vgl
yarn add file:/{PATH}/vue-grid-layout

any tips?

馃憖

Hey @gmsa can you give any information regarding my last query?

@CheyenneForbes did you register the component using

components: {
    GridLayout: VueGridLayout.GridLayout,
    GridItem: VueGridLayout.GridItem
},

The error message would be consistent with this part not being there.

I use Vue Class Components (Typescript) and there it looks like

@Component({
  components: {
    GridLayout: VueGridLayout.GridLayout,
    GridItem: VueGridLayout.GridItem,
  },
})
export default class MainScreen extends Vue {
}

oops, just remembered I stopped doing that because I'm using SSR, I'm using the hack to add it via plugins... I forgot to enable the plugin

we need to make this support being imported when using SSR so we can at least import and wrap it with

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mateo2181 picture mateo2181  路  6Comments

VitaliyInshakov picture VitaliyInshakov  路  5Comments

vitorhps picture vitorhps  路  3Comments

jovanmabilin picture jovanmabilin  路  6Comments

spider58 picture spider58  路  5Comments