alteryx/dev-harness

Support changing the locale

Opened this issue · 1 comments

Currently there is no way to change the locale with the dev-harness. Seems like everything is in place for it, but there's no UI yet.

/* AppHeader/index.tsx */

import React, { ChangeEvent } from 'react';
import { Box, MenuItem, TextField } from '@alteryx/ui';

/* ... */

const AppHeader = (props: IAppHeaderProps): JSX.Element => {
  /* ... */
  const handleChangeLocale = (event: ChangeEvent<HTMLInputElement>): void => {
    handleSetLocale(event.target.value);
  };

  return (
    /* ... */
                <Grid item>
                  <FormControlLabel
                    control={(
                      <TextField
                        onChange={handleChangeLocale}
                        select
                        SelectProps={{ autoWidth: false }}
                        value={locale}
                      >
                        {localeOptions.map(option => (
                          <MenuItem key={option.value} value={option.value}>
                            {option.primary}
                          </MenuItem>
                        ))}
                      </TextField>
                    )}
                    label={<Box mr={2}>Locale</Box>}
                    labelPlacement="start"
                  />
                </Grid>
    /* ... */
  );
};

The locale it is also missing.