Custom Scroll Resize Issue

Hi Webix Team,

I have an issue which happens only with custom scroll not normal one.

Let me explain:

I have a datatable which has vertical scroll. When I add new data with parse()
as $$(“mydatatable”).parse($$("mydatatable.count(), data:myData)

the custom scroll doesnt resize automatically if it is shown already. when I focus off the datatable and the on again the scroll is resized properly.

I tried to use webix.CustomScroll.resize() on onAfterLoad event of the datatable but nothing changed.

Thanks

Is myData a json structure of a webix.dataCollection instance?

No, I have 3 datasets that I test which are normal json arrays:

data1 = [{},{},…,{}]

data2 = [{},{},…,{}]

data3 = [{},{},…,{}]

On first scroll myData = data1 and then parse it, on second myData = data2 and on third myData = data3

Can you provide a snippet of the issue? As far as I can see, it works (click on any data item to parse an additional dataset):

http://webix.com/snippet/4eef120b

yes it seems to work here. maybe it has something to do with webix jet Im using?

the datatable is in a subview:

		{
			view: "scrollview",
			scroll:true,
			body:{ 
				cols:[{ 
					$subview:true
				}] 
			}
		}

and the datatable is quite similar to the snippet except I add next data onScrollY event for 3 datasets using a counter to check.

Any solution? Scroll goes below window and disappears until it lose focus and regain focus where it gets resized. This is on webix jet subview. I’d like it if you could supply a fix programmaticaly or something to force it hide and show so as to resize.

Thanks

Else could you tell me the easy way to let this scroll be normal browser scroll (which resizes properly on webix jet) and enable custom scroll for every other scroll in the app?

running the view without the subview as

http://localhost:80/index.html#!/dynamicLoading works

vs

http://localhost:8090/index.html#!/app/dynamicLoading

which doesn’t.

Any solution would be welcome

In the case of datatable, a custom scroll will adjust after each repaint of datatable.
if somehow it doesn’t work for you, try to add the next line of code

webix.callEvent("onReconstruct", [])

It will force custom scroll readjusting to the host component

Maksim thanks for the reply,

How to use this? I added it on $oninit but nothing happened. I want the custom scroll to readjust after i have parsed more data on the datatable.

Best Regards

The above line need to be called after parsing a new data

some.parse(data2);
webix.callEvent("onReconstruct", []); //forces the resize of active scroll

it didn’t helped on the webix jet subview but thanks anyways. I try to force reconsctruct/hide-show of the datatable to see what will happen.