-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: column.editor
and gridOptions.editorFactory
type changed
#995
Conversation
editor and edtitor factory do not return an Editor Object but a typeof Editor to be constructed with new (...) Otherwise it is impossible to implement an Editor Factory in Typescript
It would also be nice if you could provide code sample of how you expect to use this as an Editor Factory like you mentioned. Thanks |
column.editor
and gridOptions.editorFactory
type changed
I would provide an example and tests after I figured out a proper solution. |
This reverts commit b6f0819.
@manfredwippel I found 2 more lines to update, if you could please fix them, we could then go ahead with the merge. Thanks |
Co-authored-by: Ghislain B. <gbeaulac@gmail.com>
Co-authored-by: Ghislain B. <gbeaulac@gmail.com>
src/models/editor.interface.ts
Outdated
@@ -1,6 +1,7 @@ | |||
import type { EditorArguments } from './editorArguments.interface'; | |||
import type { EditorValidationResult } from './editorValidationResult.interface'; | |||
|
|||
import type { GridOption } from '../models/gridOption.interface'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after the CI ran I see that the build is failing, 1 of the reason is that you have duplicate import, you can remove line 3 since GridOption
is imported in line 4 as well so you have duplicate imports.
@manfredwippel the build is failing in the UI, I have identified at least 1 duplicate import as shown above. The CI runs the Line 58 in 61e73db
|
@@ -2,8 +2,9 @@ | |||
import { Column, ElementPosition, PositionMethod } from './index'; | |||
import type { SlickDataView } from '../slick.dataview'; | |||
import type { SlickGrid } from '../slick.grid'; | |||
import type { Column, ElementPosition, GridOption, PositionMethod } from './index'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more duplicate imports since line 2 and 5 are nearly the same, line 5 seems better to keep since it adds the missing type
which is good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry - I did not run a build since I accepted your changes in the browser only and did not sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np
ok it looks good now, let's merge. I'm not sure when I'll push a new release but sometime this week I guess, if not please remind me |
@manfredwippel I have replicated your PR into my lib Slickgrid-Universal and I found a small problem, you've assigned SlickGrid/src/models/editor.interface.ts Lines 87 to 88 in e02cf64
|
now available in v5.8.2, thanks for the contribution |
editor and edtitor factory do not return an Editor Object but a typeof Editor to be constructed with new (...) Otherwise it is impossible to implement an Editor Factory in Typescript