Skip to content

Commit

Permalink
[Logs UI] Fix column reordering in settings page (#58104) (#58150)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Fernández authored Feb 21, 2020
1 parent eafda0f commit f3137a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions x-pack/plugins/infra/public/apps/start_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export async function startApp(
// expected.
element.style.height = '100%';
element.style.display = 'flex';
element.style.overflowY = 'hidden'; // Prevent having scroll within a container having scroll. It messes up with drag-n-drop elements
element.className += ` ${CONTAINER_CLASSNAME}`;

ReactDOM.render(<App />, element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const useLogColumnsConfigurationFormState = ({

const moveLogColumn = useCallback(
(sourceIndex, destinationIndex) => {
if (destinationIndex >= 0 && sourceIndex < formState.logColumns.length - 1) {
if (destinationIndex >= 0 && sourceIndex <= formState.logColumns.length - 1) {
const newLogColumns = [...formState.logColumns];
newLogColumns.splice(destinationIndex, 0, newLogColumns.splice(sourceIndex, 1)[0]);
setFormStateChanges(changes => ({
Expand Down

0 comments on commit f3137a2

Please sign in to comment.