Sorry, we don't support your browser.  Install a modern browser

Allow saving a wpDataTable configuration when there is no data#601

?

For wpDataTables where the column definitions are based on the results of a SQL query, allow the wpDataTable configuration to be saved when there is no data returned from the query (without changing any of the datatype-related attributes of the columns). Obviously, the initial query must return at least one row so that the columns can be generated, however, later there may be simple cosmetic, or other non datatype-related changes that need to be made. We have a lot of wpDataTables that are used for “alerts” where there is no data unless something is wrong. To create the table initially, we have to create bad data so there is at least one row in the results. Then we clean that up so there are no alerts (no results).

Thus currently, whenever we want to make a cosmetic change like for the text of the column header display, we need to force some bad data to create the alert so that we can save the wpDataTable changes - we want to avoid having to create this dummy data.

8 months ago