JP
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
No such luck
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
I'm gonna try use_state and see if it changes anything
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
not untill i refresh the frame
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
Printing the grid_layout.value shows the layout frame is indeed removed, but still the ui is not changed
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
But in the delete function, it doesn't work
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
in the the first function, the append works, a new griditem is made
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
both cases i use reactive grid_layout
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
def delete_item(fname, index):
print(grid_layout.value)
if not fname == None:
os.remove('assets/vista_files/'+fname)
for card in items:
print(card.key)
if card.key == fname:
for layout in range(len(grid_layout.value)):
if index == grid_layout.value[layout]['i']:
print('removing layout with index: ' +str(grid_layout.value[layout]['i']))
grid_layout.value.pop(layout)
print(grid_layout.value)
save_grid()
16 replies
SSolara
•Created by JP on 1/31/2025 in #questions-issues
How do i remove items from GridDraggable?
def append_item(name, index):
file_names.value.append(name)
layout = {
"h": 3,
"i": index,
"moved": False,
"w": 7,
"x": index * 3,
"y": 0
}
grid_layout.value.append(layout)
save_grid()
16 replies
SSolara
•Created by JP on 1/29/2025 in #questions-issues
on_click with button_parent object
Nevermind, solved
3 replies
SSolara
•Created by JP on 1/28/2025 in #questions-issues
FileDropMultiple
I might have been too excited and glanced over the code too quickly though
12 replies
SSolara
•Created by JP on 1/28/2025 in #questions-issues
FileDropMultiple
I had a print function but maybe in solara the print function doesn't redirect to the terminal but the console, i haven't tested the console yet
12 replies
SSolara
•Created by JP on 1/28/2025 in #questions-issues
FileDropMultiple
maybe a str() function of the object in returns, just so you can see the file is actually uploaded
12 replies
SSolara
•Created by JP on 1/28/2025 in #questions-issues
FileDropMultiple
You can mark as closed!
12 replies