I'm using several list in my app. For one list, I'm trying to use the split button functionality to delete an item in the list with just a popup.
This list allow a user to add employees from a popup and delete employees from the split button.
My list is populated dynamically from a REST Service when the page loads. Each list item is a grid with a couple labels and data. One piece of data is the ability to change the hours.
My problem is on the deletion. Everything works, except that you must click on the list item to get the correct objectID to delete which is confusing and will cause deletion of the wrong user.
Testing steps:
Page loads, try to delete any item with the split button and localStorage is undefined for all split buttons.
Click an item, sets the localStorage and now that is the id uses regardless of which split button you check. Select a different list item and now that is the new id regardless of which split button you check.
What I want is the split buttons to get the id automatically for their corresponding list item without having to click on the list item. In code is seems the split button is nested in the list item so I figured it would be possible but I can't figure it out.