Forum Academy Marketplace Showcase Pricing Features

[New plugin] Fully Customizable Table / Grid

Is it possible to add support for JS rendering of objects (“toString”)?

My use case is that I need to display nested objects, as strings. Suppose I have a Thing with a nested list of Things. Right now, I search for Thing and pick the field which has the nested list. I get:

image

“[object Object]” being the default toString output for a JS object, of course.

It’s be great to be able to define a custom toString function that gets the object and returns the string I want to display, e.g.:

toString(obj) {
    return obj.someList.map(_ => _.Name).join(', ')
}

Hi @mtdewulf,

Nested list of objects are not supported at the moment. Nested list of texts are, which you can find an example of on the demo page. I will look into if I can add a feature like this in a future update for you! :slight_smile:

@Thimo: I’m getting this message when I change the data source for a column based on a condition. The column is currently formatted as a percentage:

The plugin Table / Grid / element Table / grid threw the following error:
anonymous
https://dhtiece9044ep.cloudfront.net/package/run_debug_js/798ad10090749e57e8a9e54bc1369befddeee31c0eea87630dd41d782c8f041d/xfalse/x12:6:1908729 (please report this to the plugin author)

Any chance you can help with this?

Thanks.

This appears to happen when I have an condition on the data sources that I use in the table.

@benedict Not sure what goes wrong here, I will send you an PM so we can take a better look! :slight_smile:

Hi Thimo,
How with added column action can we add html/BBCode decorators to the displayed data? (the add column action seems to be missing html/BBCode)

Or am I missing something?

Cheers
Lindsay

@lindsay_knowcode

This feature was not yet available when using the append column workflow action, but I just pushed an update (2.15.0) that should make this possible! :slight_smile: Don’t forget to refresh the editor to see the newly added field.

1 Like

Brilliant Brilliant Brilliant :smiling_face_with_three_hearts:

Hi @Thimo

Is it possible to add a button (or text link) in the cell that opens a workflow for the clicked cell user info with conditionals?

Right now I have a repeating group with a “Button1” that loads a popup with that users information. However, the button is disabled and “Button1” text changes to “not phone on file” when users cell phone is blank in the database

I’d second that requirement to have lists of objects.

Update 2.16.0

1 - Added the option to add checkboxes to the table!

2 - Added the ‘Selected checkbox row index (list)’ state & ‘Selected checkbox ID (list)’ state

3 - Added the ’Clicked index’ state to retrieve the index value of the clicked row

Don’t forget to refresh your editor after upgrading

2 Likes

Nice work!

1 Like

@Thimo I’d echo the request to be able to deal with a list of objects.

I’m not a plugin expert, but it seems that adding a “sub-field” option when a list of objects is selected might be a neat way to tackle this.

In the example below, each user has a number of roles, and I’d like to be able to display the “name” field of each role. I currently do not have this option, or the “…role’s name” option from the field dropdown. This leaves me with creating a text field in the user table for storing a list of role names as text.

Still, thanks for the awesome plugin!

Adding a field dynamically for a second list of things is, as far as I know, unfortunately not possible for me to add using the Bubble plugin editor. But, in most cases you could use the technique used in the demo for the ‘Nested thing example’ column (column 4) for nested data:

Demo editor: Pluginpreview | Bubble Editor

Hopefully this helps in your case! :slight_smile:

Thanks for the prompt response–really appreciate it.

Unfortunately, it doesn’t solve the issue, because I get a list of roles that are not associated to the employees who hold those roles.

But I think this is a good way to discuss the problem. What I–and perhaps others who’ve raised the feature request–are really aiming for is a combination of your nested thing example and your list example.

In your screenshot above, you’d get to the problem if you made the “Data” field within “Table data” a list instead of a single instance. If you did this, you’d find that you would not get the right output if you used the set up above.

Thanks!

Couple of questions re: the 2.16.0 release. I was able to display a delete button triggered by clicking a checkbox. I can successfully delete one row at a time but am having trouble deleting multiple checked rows. What’s the best way to set the unique id to achieve this?

Also, will there be an option to select all in the column header?

Lastly, I noticed with this update that my tables were occasionally blank. I had to downgrade to 2.15.0 and then switch back to 2.16.0 for the data to display again. Has anyone else experienced this?

@sydney22

You can edit multiple data entries client side in combination with the list shifter plugin. I have created a demo for your here: Designpreview | Bubble Editor

However, editing multiple data entries client side may cause some performance issues when you are editing big amounts of data. You could also do this server side using API workflow on a list.

I will look into this if I can add this feature! :slight_smile:

Thats odd! I haven’t noticed this but I will definitely keep an eye on it to see if this is happening elsewhere.

1 Like

Hmm, so it looks like the checkbox ID wasn’t used at all. I’m not looking to edit a specific column so much as delete the entire row(s). Was hoping the checked box would act like a clicked row and that every row with a checked box could then be deleted.

I think client side should be ok since this will only be used to delete a handful of rows at a time, similar to Gmail.

The checkbox IDs are actually getting used inside the ListShifter element:

This is also possible. There is a ‘checkbox is clicked’ event that triggers every time a checkbox is clicked. You can use that to delete selected rows as they are getting selected. Is that the behaviour you are looking for?

1 Like

Yes! Exactly this. I used the event to display a trash icon and want to delete the checked rows once the trash icon is pressed. However, I could only get it to delete one row at a time instead of all the checked rows.

@sydney22 I think you should be able to implement the method which you can see on the demo page from before:

You can replace the edit workflow action with a delete action to delete multiple rows (data entries). I think that should work. Does that make sense?