Skip to content

Loading…

TUIButton in tableview header. Popup Menu not showing #90

Closed
erndev opened this Issue · 1 comment

1 participant

@erndev

I am using a a TUITableView, with one header and several cells.
The header view has a TuiButton with a menu. First time the table view is loaded, the button displays the menu.

But i found a problem whenever i reload the data. If i reload the data, the button won't display the menu any more.
Debugging, i can see that the mousedown is catched, and that the call to the popUpMenuPositioningItem function is done.
But no menu is shown.
If just after that i resize the window, even a little bit, and then i click again in the button, the menu shows just fine.

I've done another test displaying a popup menu when mousedown is detected in the header view of the table, and the same happens. I need to resize the window after "reloadData" in order to be able to show the popup menu.

@erndev erndev closed this
@erndev erndev reopened this
@erndev

Well, problem solved.
If someone else faces this problem, what was happening is that i was changing the button menu (which is in the table view header) after calling reloadData. If i set the menu in the datasource methods when the header view is requested, everything seems fine.

@erndev erndev closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.