Skip to content

Commit

Permalink
use selected lang instead of first
Browse files Browse the repository at this point in the history
  • Loading branch information
okauppinen committed Nov 27, 2024
1 parent 2cb274b commit b5413d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bundles/admin/admin-permissions/view/LayerDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const LayerDetails = ({ controller, state }) => {
const { layerDetails, pagination, loading, dataProviders } = state;

const [filter, setFilter] = useState({});
const dataSource = layerDetails; // TODO: handle search or hide it
const dataSource = layerDetails;

const general = [{
title: <Message messageKey='flyout.layer.name' />,
Expand Down Expand Up @@ -74,8 +74,8 @@ export const LayerDetails = ({ controller, state }) => {
filteredValue: filter.version,
onFilter: (value, item) => item.version === value
}];
// TODO: for now has only default lang locale. Fetch data from backend and remove slice
const locales = Oskari.getSupportedLanguages().slice(0, 1).map(lang => ({
// TODO: for now has only default lang locale. Fetch data from backend and remove filter
const locales = Oskari.getSupportedLanguages().filter(lang => lang === Oskari.getLang()).map(lang => ({
title: <Message messageKey={`flyout.layer.${lang}`} />,
maxWidth: '15em',
dataIndex: lang,
Expand Down

0 comments on commit b5413d5

Please sign in to comment.