Hello! Thank you so much for helping. Currently this block of code is not working for me
class QueueActions(SelectableList):
def __init__(self, song_title:str, **kwargs) -> None:
super().__init__(
Rows=[
partial(ListItem, text=song_title),
PlayNow,
PlayNext,
Remove
],
num_visible_rows=5,
**kwargs,
)
class QueueRow(Component):
def __init__(self, title: str, **kwargs) -> None:
super().__init__(**kwargs)
self.text = self.create_child(
MarqueeText,
text=title,
font_size=10,
align="center",
vertical_align="center",
)
self.page = partial(
QueueActions,
song_title=title
)
def render(self, image):
return self.text.render(image)
class Queue(SelectableList):
def __init__(self, **kwargs) -> None:
super().__init__(
Rows=self.load_directory_rows(),
num_visible_rows=5,
**kwargs,
)
def load_directory_rows(self) -> List:
rows: List[Union[Type[EmptyQueue], partial[QueueRow]]] = []
queue = ["song1", "song2", "song3"]
for title in queue:
rows.append(
partial(
QueueRow, title=title
)
)
if len(rows) == 0:
rows.append(partial(ListItem, text="Queue is empty"))
return rows
I have a selectable list and each element leads to another selectable list. But for some reason the second selectable list is not really controllable. Only the x and o buttons works. The up and down arrows do not work at all