You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting a bug report
Maybe this is a bug or maybe you did it by design
Framework Version:
current
Please tell us about your environment:
Operating System:
All
Browser:
all
Language:
TypeScript
Current behavior: GridEventService passes grid and gridOptions, but gridOptions are out of date.
Expected/desired behavior: gridOptions are up to date
What is the expected behavior?
What is the motivation / use case for changing the behavior?
I was using attachOnClick in the GridEventService and notice you are passing the grid and gridOptions. However, if a property on the gridOptions are changed after AureliaSlickgridCustomElement initializes using grid.getOptions().fooBar = "new property", grid.getOptions() will not match gridOptions because that gridOptions are the original options used in the custom element. Slickgrid uses $.extend{} to create a copy of the gridOptions which is why these are out of sync
I know you are on vacation so don't respond to this :-). There is no rush, I just wanted to submit it as an issue/question before I forgot.
The text was updated successfully, but these errors were encountered:
This fixes a potential problem where the grid options as a parameter in the method are different than grid.getOptions. Users are allowed to change options after the grid is created by calling, for example, `grid.getOptions().showHeaderValue = false`;. To make sure the options are up to date we need to call `grid.getOptions` when passing it to the events. Looking over `AureliaSlickgridCustomElement`, it should be fine to use `this.gridOptions` because most of the configuration is happening when the custom element is being created. The only potential issue I could see is if the `datasetChanged` fires after the grid is created. Then any call to `this.gridOptions` could potentially be out of data if the developer allows the user to change options later on. You can see this bug in example3 when you switch `autoEdit` off click the "edit" button. The gridDefinition has `autoEdit=true`
closes#49
I'm submitting a bug report
Maybe this is a bug or maybe you did it by design
current
Please tell us about your environment:
Operating System:
All
Browser:
all
Language:
TypeScript
Current behavior:
GridEventService
passesgrid
andgridOptions
, butgridOptions
are out of date.Expected/desired behavior:
gridOptions
are up to dateWhat is the expected behavior?
What is the motivation / use case for changing the behavior?
I was using attachOnClick in the
GridEventService
and notice you are passing thegrid
andgridOptions
. However, if a property on thegridOptions
are changed afterAureliaSlickgridCustomElement
initializes usinggrid.getOptions().fooBar = "new property"
,grid.getOptions()
will not matchgridOptions
because thatgridOptions
are the original options used in the custom element.Slickgrid
uses$.extend{}
to create a copy of thegridOptions
which is why these are out of syncI know you are on vacation so don't respond to this :-). There is no rush, I just wanted to submit it as an issue/question before I forgot.
The text was updated successfully, but these errors were encountered: