Table title and “no rows” message

Couple of things would be great for the table component.

  • Expose the table title, an option to always show the JS table title (e.g. Table1) or to set our own title (not the JS one).
  • Change the default message for an empty table ( no rows found -> no cats for this person)

Hey @joe-smith these are both great ideas! We’ve logged them and we’ll work on them next time we make some improvements to the table component.

Is there a workaround for this in the meantime?

Hi @mathfour — there are some things you can do!

  • For the table title you can add a text component above the table. Would that work?
  • For the default/empty state message you could dynamically hide the table when there are no rows and instead show a custom message (using a text box, alert, or container with one of these inside it) displaying the desired empty state text. You could also write some custom CSS overrides to change the “no rows found” message to something else, however this might be a little brittle.

Thanks, @alex!

That’s what I decided to do - show/hide the table/note to the user. I needed either this or to make my datetimepicker work to satisfy my UX requirements. Here’s the code I used: Query using DateTimePicker giving error, but only sometimes