Added <option> disable.#933
Open
perdodi wants to merge 2 commits intotabalinas:masterfrom
perdodi:master
Open
Conversation
tabalinas
requested changes
Oct 17, 2017
Owner
tabalinas
left a comment
There was a problem hiding this comment.
Please, take a look at couple nit comments.
Also keep dist/* files unchanged (they changed only for released code)
src/fields/jsgrid.field.select.js
Outdated
| .appendTo($result); | ||
|
|
||
|
|
||
| $option.prop("disabled", (disabled === true)); |
Owner
There was a problem hiding this comment.
keep indentation consistent: 4 spaces.
src/fields/jsgrid.field.select.js
Outdated
| var value = valueField ? item[valueField] : index, | ||
| text = textField ? item[textField] : item; | ||
| text = textField ? item[textField] : item, | ||
| disabled = item['disabled']; |
Owner
There was a problem hiding this comment.
we use double-quotes usually, let's be consistent. While I'd rather just use dot notation here:
disabled = (item.disabled === true).
|
Hello, I need to do same operation in my code. I need to disable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes possible to disable options in
<select>dropdowns.Example:
{ name: "Country", type: "select" items: [ { Name: "United States", Id: 0 }, { Name: "Canada", Id: 1, disabled: true }, ], valueField: "Id", textField: "Name" }