Skip to content

[FIX] Keep user manual selection while the search does not change - #10

Open
florian-dacosta wants to merge 1 commit into
masterfrom
fix-keep-manual-selecction-while-filter-is-not-modified
Open

florian-dacosta wants to merge 1 commit into
masterfrom
fix-keep-manual-selecction-while-filter-is-not-modified

Conversation

@florian-dacosta

Copy link
Copy Markdown
Member

The case we try to solve is the following : User search for an item. Item is selected + a filter is set no sale_name. Then the user manually select a different item. We want to keep this manual selection. Before this change, it would automatically select the originally searched item every 10 seconds

The case we try to solve is the following : User search for an item. Item is selected + a filter is set no sale_name. Then the user manually select a different item. We want to keep this manual selection. Before this change, it would automatically select the originally searched item every 10 seconds
}
// Do not apply logic if the filter (lot number) did not change, in order
// to keep manual selection from the user. (filter on -001 but then manually
// click on -002 casse)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

builFilteredListSearch();
}

var lastSearchedLot = null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var lastSearchedLot = null;
var selectedLot = null;

lastSearchedLot: ça me semble ambiguë

return $scope.filteredList.search = []; //no need to continue

$scope.filteredList.search = filterAndOrder($scope.sync.data, filter);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (lot_number == lastSearchedLot) {
// exit early
  return
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants