Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yksikön johtajien käyttöoikeus ja yksikön mukaan suodatus varhaiskasvatuksessa aloittavien raportille #5886

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

tmkrepo
Copy link
Collaborator

@tmkrepo tmkrepo commented Oct 29, 2024

Raportti näyttää nyt aloittavat lapset valitulle kuukaudelle myös yksikön johtajille. Raportille lisätty yksikön nimi, yksikön mukaan suodatus ja sarakkeiden mukaan järjestäminen.

@tmkrepo tmkrepo force-pushed the remove-ssn-from-ece-arrivals-departures-reports branch 3 times, most recently from fd3eb6a to fb98275 Compare October 31, 2024 12:20
@tmkrepo tmkrepo marked this pull request as ready for review October 31, 2024 12:42
@tmkrepo tmkrepo added the enhancement Uusi toiminnallisuus tai parannus label Oct 31, 2024
Comment on lines 185 to 187
const rows = orderBy(rawResult.filter(displayFilter), sort.columns, [
sort.direction === 'ASC' ? 'asc' : 'desc'
])
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be memoized with something like

const sortedResult = useMemo(() =>
   result.map(rawResult => orderBy(rawResult.filter(displayFilter), sort.columns, [
      sort.direction === 'ASC' ? 'asc' : 'desc'
   ])),
   |result, displayFilter, sort]
)

return (
   <>
      {renderResult(sortedResult, (rows) => {

but maybe it's not too heavy anyway

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved sorting under memo, but unfiltered data is necessary for filter selection population so filtering needs to be handled separately under result rendering.

@Wnt Wnt added enhancement Uusi toiminnallisuus tai parannus and removed enhancement Uusi toiminnallisuus tai parannus labels Nov 8, 2024
@tmkrepo tmkrepo force-pushed the remove-ssn-from-ece-arrivals-departures-reports branch from fb98275 to bf625a0 Compare November 11, 2024 14:27
@tmkrepo tmkrepo force-pushed the remove-ssn-from-ece-arrivals-departures-reports branch from bf625a0 to c41a32a Compare November 11, 2024 14:43
@tmkrepo tmkrepo merged commit a14d78c into master Nov 12, 2024
29 checks passed
@tmkrepo tmkrepo deleted the remove-ssn-from-ece-arrivals-departures-reports branch November 12, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Uusi toiminnallisuus tai parannus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants