message: Query Browser: Fix table rendering for scalar results
diff: @@ -503,9 +503,18 @@ const QueryTable_: React.FC<QueryTableProps> = ({index, isEnabled, isExpanded, q
  transforms: [sortable as (v: unknown) => IDecorator],
  };
  + // TableBody's shouldComponentUpdate seems to struggle with SeriesButton, so add a unique key to help TableBody
  + // determine when it should update
  + const buttonCell = labels => ({title: <SeriesButton index={index} key={_.uniqueId()} labels={labels} />});
  +
  + let columns, rows;
  + if (resultType === 'scalar') {
  + columns = ['', {title: 'Value', ...cellProps}];
  + rows = [[buttonCell({}), _.get(result, '[1]')]];
  + } else {
  const allLabelKeys = _.uniq(_.flatMap(result, ({metric}) => Object.keys(metric))).sort();
  - const columns = [
  + columns = [
  '',
  ...allLabelKeys.map(k => ({title: k === '__name__' ? 'Name' : k, ...cellProps})),
  {title: 'Value', ...cellProps},
  @@ -520,9 +529,7 @@ const QueryTable_: React.FC<QueryTableProps> = ({index, isEnabled, isExpanded, q
  ];
  } else {
  rowMapper = ({metric, value}) => [
  - // TableBody's shouldComponentUpdate seems to struggle with SeriesButton, so add a unique key to help TableBody
  - // determine when it should update
  - {title: <SeriesButton index={index} key={_.uniqueId()} labels={metric} />},
  + buttonCell(metric),
  ..._.map(allLabelKeys, k => metric[k]),
  _.get(value, '[1]', {title: <span className="text-muted">None</span>}),
  ];
  @@ -537,7 +544,8 @@ const QueryTable_: React.FC<QueryTableProps> = ({index, isEnabled, isExpanded, q
  }
  : sortBy.index;
  const unsortedRows = _.map(result, rowMapper);
  - const rows = _.orderBy(unsortedRows, [sort], [sortBy.direction]) as string[][];
  + rows = _.orderBy(unsortedRows, [sort], [sortBy.direction]) as string[][];
  + }
  // Set the result table's break point based on the number of columns
  let breakPoint: keyof typeof TableGridBreakpoint = 'grid';
  