forked from tonytomov/jqGrid
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
!!! BREAKING CHANGES !!! The changes fixs the problem of id duplicates in the filter toolbar if more as one grid with the filter toolbar exist on the same page and the grids have *the same column names* in multiple grids. The new option `idMode` allows to manages the way of id generation. - The default value `idMode: "new"` creates safe ids based on the rule: `"gs_" + gridId + columnName`. - The option `idMode: "compatibility"` creates the ids based on another rule: `"gs_" + idPrefix + columnName`. The rule would be helpful only if one uses `idPrefix` options with *different* `idPrefix` values for every grid. One can still have id duplicates if one don't use any `idPrefix` option. - The option `idMode: "old"` forces the usage of old rule for building of the ids of the filter elements: `"gs_" + columnName`. It's important to mention, that the current changes are important **only if one uses some rule for input field directly in your code**. It's recommended that you scan your code for the string `gs_` to be sure, wthere you should make any changes in your code at all. If you will find the places in your then you can either adjust the place of the code or to use `idMode` with the value `"compatibility"` or `"old"` to revert the rule of id building to the old one. If you would like to change the default value of `idMode` option globally to the value `idMode: "compatibility"` for example, you can include the following code *before* call of `filterToolbar` method (for example directly at the beginning of you code): ```JavaScript $.jgrid = $.jgrid || {}; $.jgrid.search = $.jgrid.search || {}; $.jgrid.search.idMode = "compatibility"; // or "old" instead of default "new", which creates safe id values ```
- Loading branch information
Showing
9 changed files
with
432 additions
and
406 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.