Display none isn't working as intended

HI o/ I have to make a task thingy and everything worked as long as there was a button I used to close and open the single tasks, but then I had to change it to radio buttons (see img) since then I can only delete tasks but the display none thing isn't working anymore. [ only show open] [only show a specific person selected] I put in console output so I can track if the value change works and that seems to work just fine. I think sth with the display isn't working 😦 I tried so much that I fked up my code even more in the end than it helped q.q I hope I just made a rookie mistake some vet sees in an instant ^^' code: https://codepen.io/Becii/pen/VYYvLmj I appreciate if you only give me hints first I have till tuesday to solve this but rn I hit a wall :<
Rebecca
CodePen
Untitled
...
No description
5 Replies
vince
vince•2d ago
Can you translate to English please so it's easier for me to see what's going on? And can you try to make a minimal reproduceable example please? There's too much here, it's hard to tell what's going on for me
Becii
BeciiOP•21h ago
hey thanks for ur answer sadly that was 4 am for me 😄 I put it in english now, and removed everything to do with the pageflip and now it works 😦 but I need to page flip the pageflip worked fine, so I prob did an error implementing it?
Chris Bolson
Chris Bolson•19h ago
By page flip I presume you are referring to the pagination? Your updatePages() function (which is called after every button action) is not takling into account the current display value of each of the items. It is simply defining "flex" or "none" depening on the current page view. So, even though you have set "show open", the updatePages is overriding that. You either need a way to track the items open or closed state separately or you need to get the items' current checked radio button. Maybe a single checkbox would be better than 2 radio buttons in this case?
Becii
BeciiOP•19h ago
I just managed to finally find a solution (with a little ai help) to the pagination didnt know that its what its called we never did that in uni but yay here we had to figure it out.. I realised too I had to seperate it but dunno how on my own. I dont like the js syntax alot ._. but I will look into that checkbox thing, my issue is I "learnt" HTML and CSS like 3 years ago and now I suddenly have to use it again and Im kinda ehm lost ngl 😄 ty for ur response chris also happy easter ^-^

Did you find this page helpful?