Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using in Vue.js don't work "enableTextSelectionOnCells: true" #27

Open
e23fx opened this issue Oct 27, 2017 · 1 comment
Open

When using in Vue.js don't work "enableTextSelectionOnCells: true" #27

e23fx opened this issue Oct 27, 2017 · 1 comment

Comments

@e23fx
Copy link

e23fx commented Oct 27, 2017

npm install --global vue-cli
vue init webpack my-project
cd my-project

in package.json add dependencies:
"slickgrid-es6": "^2.1.0"
and devDependencies:

    "less": "^2.5.3",
    "less-loader": "^2.2.1"

npm install

create assets/slick.less:

@import '~slickgrid-es6/dist/slick.grid.variables.less';
@import '~slickgrid-es6/dist/slick.grid.less';
@import '~slickgrid-es6/dist/slick-default-theme.less';

HelloWorld.vue:

<template>
  <div class="hello">
    <div id="myGrid"
    class="slickgrid-container"
    style="width:600px;height:500px;"></div>
  </div>
</template>

<script>
import { Grid } from 'slickgrid-es6'
import '../assets/slick.less'

export default {
  name: 'HelloWorld',
  data () {
    return {
      grid: {}
    }
  },
  mounted: function () {
    this.$nextTick(function () {
      var columns = [
        {id: 'title', name: 'Title', field: 'title'},
        {id: 'duration', name: 'Duration', field: 'duration'}
      ]
      var options = {
        enableCellNavigation: true,
        enableColumnReorder: false,
        enableTextSelectionOnCells: true
      }
      var data = []
      for (var i = 0; i < 500; i++) {
        data[i] = {
          title: 'Task ' + i,
          duration: '5 days'
        }
      }
      this.grid = new Grid('#myGrid', data, columns, options)
    })
  }
}
</script>

<style scoped>
</style>

npm run dev

And text is not can be selected in cells. Please check it.

@harit2101
Copy link

Even am struggling to copy cell text value.Any help would be really helpful ..

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants