Skip to content
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

editorArgs function for always-on editors also takes object parameter #1061

Closed
wants to merge 8 commits into from

Conversation

yassam
Copy link

@yassam yassam commented Dec 31, 2014

The Editor mixin specifies a column property editorArgs, which can
either be an object or a function returning an object. If it's a
function, the function takes a column object as its parameter.

My change was to also pass the row object as the second parameter to
editorArgs. This can only be passed for always-on editors, so for
shared editors (aka editOn editors) only the column parameter is
passed (the object parameter is undefined).

I needed to create always-on editors with parameters that depended on
the row data, and this is the only way I could see of doing it. For
editOn editors it's possible to set up a handler for the
dgrid-editor-show event and get the row data that way, but I don't
think that event is emitted for always-on editors.

yassam and others added 8 commits January 1, 2015 09:38
The Editor mixin specifies a column property editorArgs, which can
either be an object or a function returning an object. If it's a
function, the function takes a column object as its first parameter.

My change was to also pass the row object as the second parameter to
editorArgs. This can only be passed for always-on editors, so for
shared editors (aka editOn editors) only the column parameter is
passed (the object parameter is undefined).

I needed to create always-on editors with parameters that depended on
the row data, and this is the only way I could see of doing it. For
editOn editors it's possible to set up a handler for the
dgrid-editor-show event and get the row data that way, but I don't
think that event is emitted for always-on editors.
@msssk
Copy link
Contributor

msssk commented Jan 9, 2020

Merged in #1446

@msssk msssk closed this Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants