# @spacebnd/vuetify-data-table-resizable-columns

> resizable columns vue directive for vuetify v-data-table

Latest version **1.0.8** (published 2022-03-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @spacebnd/vuetify-data-table-resizable-columns
pnpm add @spacebnd/vuetify-data-table-resizable-columns
yarn add @spacebnd/vuetify-data-table-resizable-columns
bun add @spacebnd/vuetify-data-table-resizable-columns
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2022-03-27 |
| First published | 2021-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 417.4 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | Vitaly Petrovich |
| Maintainers | spacebnd |
| Keywords | resizable columns, column width, vuetify, data table, v-data-table, vue directive |

## Links

- npm: https://www.npmjs.com/package/@spacebnd/vuetify-data-table-resizable-columns
- Repository: https://github.com/spacebnd/vuetify-data-table-resizable-columns
- Homepage: https://spacebnd.github.io/vuetify-data-table-resizable-columns
- Issues: https://github.com/spacebnd/vuetify-data-table-resizable-columns/issues
- npm.io page: https://npm.io/package/@spacebnd/vuetify-data-table-resizable-columns

## Dependencies (6)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [vuetify](https://npm.io/package/vuetify.md) ^2.4.0
- [vue-class-component](https://npm.io/package/vue-class-component.md) ^7.2.3
- [vue-property-decorator](https://npm.io/package/vue-property-decorator.md) ^9.1.2
- [@types/resize-observer-browser](https://npm.io/package/@types/resize-observer-browser.md) ^0.1.6

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2022-03-27
- 1.0.7 — 2022-03-27
- 1.0.6 — 2022-03-26
- 1.0.5 — 2022-03-25
- 1.0.4 — 2021-12-13
- 1.0.3 — 2021-12-12
- 1.0.2 — 2021-12-08
- 1.0.1 — 2021-12-08
- 1.0.0 — 2021-12-07
- 1.0.16 — 2021-12-05

## README

# vuetify-data-table-resizable-columns

Resizable columns Vue directive for [Vuetify](https://github.com/vuetifyjs/vuetify) v-data-table

#### [Online Demo](https://spacebnd.github.io/vuetify-data-table-resizable-columns/)

--- 

### Install
```shell
npm install @spacebnd/vuetify-data-table-resizable-columns
```
### Registration
```javascript
// main.js

import vuetify from '@/plugins/vuetify'
import ResizableColumns from '@spacebnd/vuetify-data-table-resizable-columns'

Vue.use(ResizableColumns)

new Vue({
  vuetify,
  render: (h) => h(App),
}).$mount('#app')
```
---

### Usage
```vue
<template>
  <v-data-table 
    v-resizable-columns 
    :headers="headersArr" 
    :items="itemsArr"
  >
  </v-data-table>
</template>
```
### Options
Expects: `string`  
Available values: `'debug'` `'redraw'`

#### Examples
```vue
# debug

<template>
  <v-data-table 
    v-resizable-columns="option" 
    :headers="headersArr" 
    :items="itemsArr"
  >
  </v-data-table>
</template>

<script>
export default {
  data () {
    return {
      option: 'debug'
    }
  }
}
// debug messages will be shown to the console
</script>

```

```vue
# redraw

<template>
  <v-data-table 
    v-resizable-columns="option" 
    :headers="headersArr" 
    :items="itemsArr"
  >
  </v-data-table>
</template>

<script>
  export default {
    data () {
      return {
        option: null
      }
    },
    watch: {
      someProperty: function (val) {
        if (val > someConditionRequiringRedrawing) {
          this.$nextTick(() => {
            this.option = 'redraw'
          })
          // after redrawing, the 'option' property will be automatically assigned 'null', 
          // which makes it possible to use it an unlimited number of times
        }
      },
    }
  }
</script>
```

> **NOTE:**  Possible incorrect behavior when using props that change the table structure

---

### License

[MIT](https://github.com/spacebnd/vuetify-data-table-resizable-columns/blob/main/LICENSE.md)

---
_Source: https://npm.io/package/@spacebnd/vuetify-data-table-resizable-columns · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
