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

DataGrid inconsistent update behaviour #385

Closed
PvdBerg1998 opened this issue Jul 26, 2017 · 4 comments
Closed

DataGrid inconsistent update behaviour #385

PvdBerg1998 opened this issue Jul 26, 2017 · 4 comments

Comments

@PvdBerg1998
Copy link
Contributor

DataGrid does not update its items when they are removed from a bound data collection.

It's also inconsistent, it seems that the first removal succeeds, after that nothing happens.
The cells update to their correct contents when clicking on them.

Sample code:

scrollpane() {
	content = datagrid(data) {
		cellFormat { x -> ... }
	}
}

fun x()
{
	data.remove( ... )
}

I haven't tested if the scrollpane makes a difference.
Note that you can swap the datagrid with a listview - which works fine.

Switching cellFormat to cellCache makes no difference.

@PvdBerg1998 PvdBerg1998 changed the title DataGrid unconsistent update behaviour DataGrid inconsistent update behaviour Jul 26, 2017
@edvin
Copy link
Owner

edvin commented Jul 27, 2017

Does it only fail when you remove from the bound list, or if you remove from the items property of the datagrid as well? As small runnable sample would be great, but I'll try to investigate myself in the meantime.

@edvin
Copy link
Owner

edvin commented Jul 27, 2017

Ah, I see what's going on. Working on it now :)

@edvin
Copy link
Owner

edvin commented Jul 27, 2017

I have committed a fix now, so that the itemsPropertyChangeListener is correctly called. Does it work for you now?

@PvdBerg1998
Copy link
Contributor Author

Appears to be fixed :)

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