Little Help needed in checkbox and selection design #11492
-
Hi, i have a custom query where i have to select multiple rows and do something with it afterwards . I am struggling to get this working. What i need is something mentioned here: And here: In the first example, it looks like a table, but i doubt it is a table. i see the dataprovider, a repeater, a checkbox and text paragraphs. But how to manage that into a very nice design that it looks like a table (with a header) how can i determine which rows are selected and put it into an array, knowing that i can use an id from the table. i think i need some javascript to build up and change the array after selecting or de-selecting rows, but i just need a little example. If someone can hand a simple example i would be gratefull! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Ok, i think i am getting there. but there seems to be a bug or something i miss. I create a litte app to debug and a mysql database with one test table. This is the layout, the dataprovider points to a custom query wich is a simple 'select * from selecttest': As you see there are 3 rows. If i select the first or the second row, the last row also selects.. is that a bug? This is selfhosted running 2.9.5 |
Beta Was this translation helpful? Give feedback.
The table component has selectable functionality built in. So you could use that to get the selected items and then execute your custom query that way?
In the below example I'm getting the selected row _ids, fetching them from their specific table and then outputting the row in a notification.
You likely could use a similar process but instead use the execute query action and bind up whatever necessary bindings you need to.
Hopefully this helps in some way.