Search code examples
vue.jsslotsvue-material

Vue material - single selection for md-table using slots


In Vue Material Table component there is an explanation for single selection, which in codepen doesn't work https://vuematerial.io/components/table (SCROLL TO SINGLE SELECTION). I want working example of this making sure that the list to be rendered is from API.


Solution

  • The example on Vue Material - Table / Selection / Single requires [email protected] to run.

    The pen that opens is using https://unpkg.com/vue-material@beta as dependency (See at Pen Settings -> JavaScript tab).

    Currently https://unpkg.com/vue-material@beta resolves to https://unpkg.com/[email protected]/dist/vue-material.min.js. Shouldn't take long until it starts to point to beta-8.

    Solution:

    Nevertheless, until it updates the version, you should add the dependency https://unpkg.com/[email protected]/dist/vue-material.min.js yourself:

    • Button Settings
    • JavaScript tab
    • Third URL down below: where it is https://unpkg.com/vue-material@beta make it https://unpkg.com/[email protected]/dist/vue-material.min.js
    • Profit.

    Check an updated pen (where I changed it): https://codepen.io/acdcjunior/pen/yKBvgL