| 322 | |
| 323 | namespace { |
| 324 | nlohmann::json tableData( |
| 325 | const char* name, const std::vector<std::vector<std::string>>& rows, const std::vector<int>& selected) { |
| 326 | nlohmann::json d; |
| 327 | d[name]["headers"] = {"A", "B"}; |
| 328 | d[name]["rows"] = rows; |
| 329 | d[name]["selected_rows"] = selected; |
| 330 | return d; |
| 331 | } |
| 332 | } // namespace |
| 333 | |
| 334 | // Selecting a row re-delivers identical rows under the same widget-data key. |