table icon indicating copy to clipboard operation
table copied to clipboard

ensure columnPinning.[property] is not accessed unsafely

Open rustysys-dev opened this issue 1 year ago • 3 comments

Had issues with the qwik examples etc... things just didn't really work at all, and it seems like unnecessary processing is being done in the lib..

In anycase, I decided to build my own table using the core lib directly for qwik.. however I am running into a bug, where if you provide an empty state to start off with the entire app crashes on trying to read the left property on columnPinning as shown:

image

I notice that most (not all) other functions in the code which do something similar are not accessing it safely with columnPinning?.[property]

rustysys-dev avatar Apr 29 '24 23:04 rustysys-dev

Maybe it would make more sense for us to make sure all of the typescript types enforce the full object is always present?

KevinVandy avatar May 03 '24 16:05 KevinVandy

@KevinVandy I think that would satisfy the requirement as well, but I suppose I should ask, is column pinning really required to be defined? If it must be defined for other features etc to work then enforcement via typescript is definitely best.

If not then a thought in the back of the head is that it would cause unnecessary development required when using the core lib.

rustysys-dev avatar May 14 '24 04:05 rustysys-dev

@KevinVandy I think that would satisfy the requirement as well, but I suppose I should ask, is column pinning really required to be defined? If it must be defined for other features etc to work then enforcement via typescript is definitely best.

If not then a thought in the back of the head is that it would cause unnecessary development required when using the core lib.

Yes, it is assumed that all of the getInitialState calls for each feature have been called successfully.

KevinVandy avatar May 14 '24 14:05 KevinVandy