aminalaee / sqladmin

SQLAlchemy Admin for FastAPI and Starlette
https://aminalaee.dev/sqladmin/
BSD 3-Clause "New" or "Revised" License
1.71k stars 175 forks source link

Missing column_editable_list feature currently present in Flask-Admin #678

Open aleksarias opened 7 months ago

aleksarias commented 7 months ago

Checklist

Is your feature related to a problem? Please describe.

Not related to a problem.

Describe the solution you would like.

Table views should allow for inline editing of row values by setting column_editable_list class variable to a list of columns that should be editable inline.

Describe alternatives you considered

There is no alternative. Being able to edit row values in the list view significantly reduces the number of clicks required when modifying several records.

Additional context

No response

jacobgarder commented 4 months ago

I also think this is a very nifty feature, but its not in the list of feature parity with flask-admin..

Is this something that is worked on?

hasansezertasan commented 2 months ago

Flask Admin uses X Editable for it and X Editable is not maintained, also doesn't work with both Bootstrap5 and Tabler.

If I were implementing such a feature, I would definetel ly go with HTMX.

Create, edit and detail modals feature from Flask Admin is also missing, and yeah, HTMX again...

One final thing, for a more SPA approach, why not use HTMX for the entire layout?

@aminalaee, please let me know of what you think. Also do you know about HTMX? Do you think it'll fit?

aminalaee commented 2 months ago

@hasansezertasan Could we still Jinja2 templates and WTForms with the HTMX approach? I don't know much about HTMX but I want to make sure we are not going in the direction of SPA with APIs rather than we are dealing with templates here, on purpose. If you think this is possible I think a separate ticket to describe the approach and effort would be much appreciated and we can start from there.

hasansezertasan commented 1 month ago

Could we still Jinja2 templates and WTForms with the HTMX approach? I don't know much about HTMX but I want to make sure we are not going in the direction of SPA with APIs rather than we are dealing with templates here, on purpose.

Yes, we could still use Jinja2 Templates, WTForms, and all other technologies with the HTMX approach. I wasn't talking about ReactJS or VueJS-style SPAs. Check out this article: </> htmx ~ SPA Alternative. We'll talk more about this later.

If you think this is possible I think a separate ticket to describe the approach and effort would be much appreciated and we can start from there.

I think it is possible. We will be simply using hx-swap=".page-wrapper". I'll open a ticket and start working this weekend, I also think you should check @pydantic/fastui#48.