Skip to content

Fix table column visibility preferences triggering redundant requests - #727

Merged
nscuro merged 1 commit into
DependencyTrack:masterfrom
nscuro:fix-redundant-request
Feb 3, 2024
Merged

nscuro merged 1 commit into
DependencyTrack:masterfrom
nscuro:fix-redundant-request

Conversation

@nscuro

@nscuro nscuro commented Feb 3, 2024

Copy link
Copy Markdown
Member

Description

Fixes table column visibility preferences triggering redundant requests.

Addressed Issue

N/A

Additional Details

When applying user preferences for column visibility, fields of the bootstrap table were accessed directly. Apparently the bootstrap table has watches on those fields, which caused table contents to be loaded at least twice, instead of once.

This does not happen when using the "official" table.showColumn / table.hideColumn methods. Switching to those no longer causes duplicate requests.

Checklist

When applying user preferences for column visibility, fields of the bootstrap table were accessed directly. Apparently the bootstrap table has watches on those fields, which caused table contents to be loaded at least twice, instead of once.

This does not happen when using the "official" `table.showColumn` / `table.hideColumn` methods. Switching to those no longer causes duplicate requests.

Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added the defect Something isn't working label Feb 3, 2024
@nscuro nscuro added this to the 4.11 milestone Feb 3, 2024
@nscuro
nscuro merged commit 22371f5 into DependencyTrack:master Feb 3, 2024
@nscuro nscuro mentioned this pull request Feb 3, 2024
2 tasks done
@nscuro
nscuro deleted the fix-redundant-request branch February 3, 2024 20:03
@rkg-mm

rkg-mm commented Feb 4, 2024 •

Copy link
Copy Markdown
Contributor

@nscuro does this fix the same as I fixed in #658 (see additional section)?

@nscuro

nscuro commented Feb 4, 2024

Copy link
Copy Markdown
Member Author

Ah, sorry it didn't occur to me that you already identified and fixed this particular issue!

Looks like our solutions are different but achieve the same thing. Reading the Defer URL docs it looks like the more sustainable approach, so may use that instead of what I hacked together. 😆

@rkg-mm

rkg-mm commented Feb 4, 2024

Copy link
Copy Markdown
Contributor

Yes I came across this when implementing the other stuff and fixed it directly since it had an effect on what I did there :D maybe should have documented it better :D Yes I think that would be the better approach

@nscuro

nscuro commented Feb 4, 2024

Copy link
Copy Markdown
Member Author

Hmmm I just tested and deferUrl is not universally usable. For example in the project list, it causes the list to always be empty until a project is added or the filter toggles are used. Using the table's refresh button does nothing.

@rkg-mm

rkg-mm commented Feb 4, 2024

Copy link
Copy Markdown
Contributor

Hmm ok I didn't notice any issues :(

heyiamwahab236 pushed a commit to tecan/frontend_custom that referenced this pull request Jun 17, 2026
Fix table column visibility preferences triggering redundant requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants