Closed FleetPhil closed 7 years ago
@hotairforacoolbreeze Check out v 0.1.5. Updated as per your request :) Screenshot looks nice. Are you using unicode for tick mark and cross symbol?
Thanks for the super quick response! Yes, these are Unicode 2713 and 2717 for the marks. Thanks Phil
You are welcome. Hope you are finding it useful for your project :)
Sorry - it's not working - the column title is set when the menu is first set up but then back to the previous behaviour when a menu item is selected. I think the issue is in the line of code below where the title is reset after a selection is made... ` func confiMenuWith(row: NSInteger) {
let title = self.titles[self.currentSelectedMenuIndex]
if updateColumnTitleOnSelection {
title.string = self.datasource?.titleForRow(at: JNIndexPath(column: self.currentSelectedMenuIndex, row: row), for: self)
}
`
Are you setting this flag to false ?
menu.updateColumnTitleOnSelection = false
I have mentioned that in Readme in change log.
Doh! Sorry I missed that - it's fine now, thanks!
Hi - I have a use case where the drop down is a list of filter criteria for a list - each row can be selected or deselected by clicking on it and it has a tick or cross to indicate if it is selected (example below). I can update the row text dynamically and this works OK, but the column title is automatically set to the last selected item when I would like to be able to set it manually - with something like a function of JNDropDownMenu: func setTitle(_ title : String, forColumn: NSInteger) If not called it would default to the existing behaviour, but if present would set the column title to the specified value irrespective of the last item selected.
Let me know what you think - Thanks, Phil