I’m currently facing a challenge with a feature in my project and would greatly appreciate any guidance or advice you could offer.
I have a table set up with a “detail” view, and each row has a button that activates a checkbox within the same row. I’ve implemented a filter with the functionality that if the checkbox is activated, the respective row should become invisible. However, I’m encountering an issue where the row remains visible even after activating the checkbox. It only disappears when I click elsewhere on the page.
I’ve tried a few approaches to solve this, but so far, I haven’t been successful. If anyone has encountered a similar problem or has any suggestions on how to fix this issue, I would be very grateful for your insights.
@Piet_Strydom is right, rows that are still “in focus” don’t automatically disappear when filtered out of a view until they lose focus by the user clicking away from the row. This is by design, allowing users to continue to work on a row even after their action cause the row to filter out.
As you’ve noticed, Coda seems to remember the focused element of each page separately in a doc. Switching to another page, then back to the page with the table will not unfocus the row and will therefore not apply the filter!
That said, there are cases where you’d hope for the action to be instantly applied. There is a solution. You basically have to force the row to be unfocused after the checkbox is modified. The only way to do this is with a button that performs two actions:
Modify the checkbox
Unfocus the current row
I’ve whipped up a little demo doc to explain the solution.
hello. I have been testing this solution and although it works in table mode, it does not work in detail mode. can there be any solution? thank you so much
Hi @Ximo_Escamilla
Can you post a sample doc so I can better understand what you’re trying to achieve? I’m sure we’ll be able to figure something out for you…
You can test in the same document that you created. I have put the view in detail mode and now when I press the button it does not hide, it remains until you remove the focus.
I think I get what you’re trying to do… Are you hoping that once the checkbox is checked, the row hides from the left bar of the details view?
There isn’t a great solution to this problem. You need to blur all elements in that details view. A solution is to OpenWindow() to the next row (note how when you select a row from the left bar of the details view, the URL changes from /r1 to /r2, etc at the end) but eventually as you filter out rows you run out of rows to redirect to.