gustagol
gustagol
TTCTheo's Typesafe Cult
Created by gustagol on 2/20/2024 in #questions
Table header with `position:sticky` and have horizontal scroll in the table at the same time?
I'm building a table that on mobile, needs to have a sticky header (top of the screen), but also needs to have an scroll on X axis. I can't seem to be able to make both work together. This is the code example of what I'm trying to do: https://jsfiddle.net/xj2fh56r/1/ If you look at the example, the header is currently sticky, but the horizontal scroll is scrolling the entire page rather than just the table body. If we set overflow-x: auto; on the table wrapper, to limit the size of the table to the container width, then we lose the sticky behavior from the header. Does anyone know of a way to make that work? Thanks in advance!
2 replies
TTCTheo's Typesafe Cult
Created by gustagol on 12/7/2023 in #questions
Storing JWT refresh token in httpOnly cookie
So, I'm building the auth part of an application. I have always return both access and refresh tokens on the payload. And them have them stored separately on the client. Now, after doing a little research, I have found that some people return just the access token on the payload, and have the refresh token set as an httpOnly cookie. What is the opinion on this? Good practice? Bad practice? Unnecessary / anti pattern? Thanks in advance!
18 replies