Premium support for our pure JavaScript UI components


Post by jit@flowit.dk »

Hi,

We need to be able to save the order of columns along with their individual widths so these settings can be later restored. What events and APIs can be used to retrieve and set these settings programmatically?

We must be able to change the order of columns programmatically without reloading the page, så using configs which can't be changed after render is not ideal.

-- Thanks

Best regards
Jimmy Thomsen


Post by mats »

This is supported out of the box through the State API. Have you seen this demo? https://bryntum.com/products/grid/examples/state/

Docs: https://bryntum.com/products/gantt/docs/api/Core/state/StateProvider


Post by jit@flowit.dk »

Thanks @mats.

We were hoping for a more specialized event due to the complexity of the state object and lack of TypeScript support. We do not want to restore everything in the state object, so we would have to manipulate it or construct a new state object when columns are to be restored - but perhaps that's the recommended approach, constructing the state object manually ?

Just to add some more context;
We are trying to preserve some select view settings in the database so the user can restore them when needed sometime in the future.

Best regards
Jimmy Thomsen


Post by johan.isaksson »

Hi,

Adding a way of affecting the state object before it is serialized sounds like a resonable request, have opened a ticket on it here:

https://github.com/bryntum/support/issues/6984

Best regards,
Johan Isaksson

Post by jit@flowit.dk »

Thanks @johan.isaksson.

Since we are already in the process of incorporating this into our product, an ETA would be greatly appreciated.

Best regards
Jimmy Thomsen


Post by johan.isaksson »

Hi,

With this being the first request for it, it is not yet planned for implementation. Please subscribe to the issue to get updated on any developments, or if urgent you could reach out to Professional Services (https://bryntum.com/services/) regarding a features sponsorship.

Best regards,
Johan Isaksson

Post by jit@flowit.dk »

@johan.isaksson: Could you guys at least commit to providing TypeScript support for it in the next release, so when it breaks, it does so compile time instead of run time? Given that Gantt is sold with TypeScript support, I think that's reasonable.

Best regards
Jimmy Thomsen


Post by mats »

We'll make sure to add TS support for the feature when it's fixed yes!


Post by jit@flowit.dk »

Thank you @Mats

Best regards
Jimmy Thomsen


Post Reply