-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table cells are always inputs #39
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this change. The readonly-attribute
div was intended to be used for readonly attributes, that should not be displayed with a form input. #23 is related to this
Non-editable attributes are a separate feature, not implemented yet, and those will not be inputs of course. The point here is to avoid swapping between text blocks and inputs, which makes the screen flicker and other styling differences. This also makes it natively available to tab through the cells because the user can now tab through all inputs. For read-only attributes I imagine table-cells to be conditionally rendered like: <td>
<% if attribute.editable? %>
<%= render "editable_attribute", model: @model, record: record, attribute: attribute %>
<% else %>
<span><%= attribute %></span>
<% end %>
</td> |
b75facb
to
640654e
Compare
Disregard, let's go with this simplified version for now and see 👍🏼 |
Related to #15
There is no more hidding/showing text and inputs. Form inputs are now always shown and are styled to fit the table properly.
Screen.Recording.2025-01-15.at.16.37.04.mov