yiisoft / yii-dataview

Data widgets
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
39 stars 21 forks source link

GridView bulk delete #21

Open nicdnepr opened 5 years ago

nicdnepr commented 5 years ago

Why Grigview don't have bulk delete? Can it be add in common functional?

samdark commented 5 years ago

Won't add it in 2.0 since it's feature-locked. Will consider for 3.0.

terabytesoftw commented 2 years ago

I think that the bulk delete should be implemented by the programmer, the GridView, any data source can be used.

samdark commented 2 years ago

That's not about data source. It's about UI such as the one in GMail:

image
terabytesoftw commented 2 years ago

If it is possible to do it :)

glpzzz commented 2 months ago

Can the solution of this problem be to provide support for some kind of toolbar for GridView, a toolbar attribute which is an array of Yiisoft\Html\Tag\Button and of course toolbarAttributes?

Proposed markup:

<div>
  <div>
    <button>Action 1</button>
    <button>Action 2</button>
    <button>Action 3</button>
  <div>
  <table>
    ...
  </table>
</div>

This does not provide any functionality, just the markup for the controls. The functionality should be provided by the developer independently and is supposed to be used together with CheckboxColumn, not only for bulk deletion, but also for export or others.

Also, the styling is not provided by GridView itself.

vjik commented 2 months ago

This can be implemented via toolbar with buttons (as @glpzzz suggested) or with select, that contain actions:

image

But, I think, this features should to be postponed until after the release.