vue-file-agent icon indicating copy to clipboard operation
vue-file-agent copied to clipboard

Sortable not working: Unknown custom element: <vfa-sortable-item>

Open atlcodecommandr opened this issue 4 years ago • 6 comments

I've added the following to main.js:

import { SlickList, SlickItem } from 'vue-slicksort';
Vue.component('vfa-sortable-list', SlickList);
Vue.component('vfa-sortable-item', SlickItem);

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

found in <VueFileAgent>

atlcodecommandr avatar Aug 19 '20 21:08 atlcodecommandr

Make sure you're registering the components before mounting root element

// ...

Vue.component('vfa-sortable-list', SlickList);
Vue.component('vfa-sortable-item', SlickItem);

new Vue({
  render: h => h(App)
}).$mount("#app");

with script tag

<script>
  if (window.VueSlicksort) {
    Vue.component('vfa-sortable-list', window.VueSlicksort.SlickList);
    Vue.component('vfa-sortable-item', window.VueSlicksort.SlickItem);
  }
  new Vue({
    // ...
  }).$mount("#app");
</script>

safrazik avatar Aug 20 '20 06:08 safrazik

I’m doing it the first way and still having issues.

atlcodecommandr avatar Aug 20 '20 10:08 atlcodecommandr

Screen Shot 2020-08-20 at 9 25 38 AM

atlcodecommandr avatar Aug 20 '20 13:08 atlcodecommandr

Looks like the code is fine, are you sure you installed vue-slicksort?

npm install vue-slicksort --save
OR
yarn add vue-slicksort

Docs for: sortable prop

safrazik avatar Aug 20 '20 14:08 safrazik

Yeah i installed it right, and if I test it with the demo from their git with just SlickList, SlickItem it works fine.

atlcodecommandr avatar Aug 20 '20 19:08 atlcodecommandr

I am having this issue also with locally installed slick sort

michaeljcoyne avatar Apr 29 '21 14:04 michaeljcoyne