-
-
Notifications
You must be signed in to change notification settings - Fork 119
Conversation
Thanks for the PR, however if this option is really only used with the Autocomplete Editor, I would rather move it into the I try to keep, as much as possible, only options that can be used by all Editors inside the |
That sounds reasonable, I changed it to the |
If you want the intellisense to work, could maybe change the editorOptions?: MultipleSelectOption | forceUserInput?: boolean | any; I know that keeping the editorOptions?: MultipleSelectOption | FlatpickrOptions | AutoCompleteOptions; but that is kinda long, I don't have time to do that. Unless you or anyone else have a better way of doing it with TypeScript |
I am happy to give a hand on that, and that would be a lot better since we can track the options straight away (maybe on a next pull request) What about if you create a project and add tasks there so contributors know what can be done to help? |
Sure, I created the version 2.x - Project and added some tasks there. I didn't use much before, so if you have better ways of displaying that, let me know, I think it should be enough to start. I can reference a PR to the task when it opens up |
@@ -69,7 +71,7 @@ export class AutoCompleteEditor implements Editor { | |||
const title = this.columnEditor && this.columnEditor.title || ''; | |||
this.labelName = this.customStructure && this.customStructure.label || 'label'; | |||
this.valueName = this.customStructure && this.customStructure.value || 'value'; | |||
|
|||
this.forceUserInput = this.columnEditor && this.columnEditor.editorOptions && this.columnEditor.editorOptions.forceUserInput ? this.columnEditor.editorOptions.forceUserInput : false; |
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.
To simplify this line, you could maybe use a Getter, for example see this Getter. It's just a suggestion, I could also accept the code without it too
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.
Done, makes sense to refactor it :)
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.
Oh man I'm really sorry, I was not clear in my comment, can you change it to the following
get editorOptions() {
return this.columnEditor && this.columnEditor.editorOptions || {};
}
then you can call your boolean values (and any other editor options) like so
serializeValue() {
if (this.editorOptions.forceUserInput) {
...
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.
No problem at all (never used getter before) made a new pr, let me know if it is what you have in mind. Thanks
init(): void { | ||
const columnId = this.columnDef && this.columnDef.id; | ||
const placeholder = this.columnEditor && this.columnEditor.placeholder || ''; | ||
const title = this.columnEditor && this.columnEditor.title || ''; | ||
this.labelName = this.customStructure && this.customStructure.label || 'label'; | ||
this.valueName = this.customStructure && this.customStructure.value || 'value'; | ||
|
||
this.forceUserInput = this.forceUserInputChecker; |
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.
do you really need this line after using the Getter?
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.
not after the changes you requested, removed it.
Thanks looks good now :) |
Will merge now, I was trying to fix the new Circle-CI and Codecov for unit tests coverage. I finally found the correct config. Sweet, I now have full CI (continuous integration) in the project :) |
No problem, many thanks for telling me. Is there a slack chanel or irc chanel you use to go? |
I don't really use Slack and there's no channel or any kind since I'm alone on this lol |
Fixes #174