vue-chat-scroll icon indicating copy to clipboard operation
vue-chat-scroll copied to clipboard

Dynamically change `enabled` value

Open joelambert opened this issue 3 years ago • 4 comments

Describe the bug Can't dynamically change the enabled value

To Reproduce Steps to reproduce the behavior:

  1. Follow instructions in README to change the enabled value from scope data (https://github.com/theomessin/vue-chat-scroll#disable-vue-chat-scroll-using-configuration-prop)

Expected behavior To be able to change the enabled value reactively.

Additional context It appears that when following the docs and appending : to the directive, it doesn't load at all. Without this the directive loads but the config value is not reactive.

Any help much appreciated, thanks for the great utility!

joelambert avatar Oct 06 '20 17:10 joelambert

@joelambert what i did was to bind the whole configuration object as a data property:

<ul class="messages" :v-chat-scroll="scrollOptions">

and

data() => {
  scrollOptions: { enabled: true, always: false, smooth: false, notSmoothOnInit: true },
},

It seemed to work

gsusmonzon avatar Nov 17 '20 18:11 gsusmonzon

@gsusmonzon it's same not working. that code r u working?

FrontLeejonghun avatar May 04 '21 06:05 FrontLeejonghun

it's same not working.

DOCHIS avatar Sep 14 '21 03:09 DOCHIS

I am having same issue, data is not reactive. Is there any way I can fix this?

chiragparekh avatar Nov 16 '21 10:11 chiragparekh