Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

[Question]: How to access width? #25

@Kaschi14

Description

@Kaschi14

Question description

I want to rerender some stuff in my application based on the new width of the resizable resized v-resize-drawer. But I can't seem to manage.

Steps to reproduce

I tried with adding a ref to v-resize-drawer:
<v-resize-drawer
ref="drawer"
:width="drawerWidth"
@handle:drag="handleDrag"
...

and added drawerWidth as a local prop

and then accessing it in a method:
handleDrag() {
const drawerElement = this.$refs.drawer.$el;
const newWidth = drawerElement.offsetWidth;
console.log('Drawer width:', newWidth);
// do something with the updated width
},

Relevant log output

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions