Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!3805
Issue
#1149078
: States API doesn't work with multiple select fields
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Open
Issue
#1149078
: States API doesn't work with multiple select fields
issue/drupal-1149078:1149078-states-api-doesnt
into
10.1.x
Overview
5
Commits
12
Pipelines
1
Changes
3
2 open threads
Hide all comments
Open
Issue #1149078: States API doesn't work with multiple select fields
Vladimir Roudakov
requested to merge
issue/drupal-1149078:1149078-states-api-doesnt
into
10.1.x
Apr 11, 2023
Overview
5
Commits
12
Pipelines
1
Changes
3
2 open threads
Hide all comments
0
0
Merge request reports
Compare
10.1.x
version 11
80ed873d
Jun 16, 2023
version 10
4a587d80
Jun 16, 2023
version 9
991fe1a6
Jun 16, 2023
version 8
3ab7d47c
Jun 15, 2023
version 7
1f48b5d9
Jun 15, 2023
version 6
ecfb75f6
Jun 15, 2023
version 5
5cf9ab4c
Jun 14, 2023
version 4
2664f0d2
Jun 8, 2023
version 3
4a0bcf57
Apr 28, 2023
version 2
f32c8c2f
Apr 19, 2023
version 1
1f10d67b
Apr 11, 2023
10.1.x (HEAD)
and
latest version
latest version
4d0be715
12 commits,
Oct 30, 2023
version 11
80ed873d
12 commits,
Jun 16, 2023
version 10
4a587d80
11 commits,
Jun 16, 2023
version 9
991fe1a6
10 commits,
Jun 16, 2023
version 8
3ab7d47c
9 commits,
Jun 15, 2023
version 7
1f48b5d9
9 commits,
Jun 15, 2023
version 6
ecfb75f6
8 commits,
Jun 15, 2023
version 5
5cf9ab4c
7 commits,
Jun 14, 2023
version 4
2664f0d2
5 commits,
Jun 8, 2023
version 3
4a0bcf57
2 commits,
Apr 28, 2023
version 2
f32c8c2f
2 commits,
Apr 19, 2023
version 1
1f10d67b
1 commit,
Apr 11, 2023
3 files
+
186
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
core/misc/states.js
+
10
−
0
View file @ 60f91d4e
Edit in single-file editor
Open in Web IDE
Hide comments on this file
Show full file
@@ -149,6 +149,7 @@
*
* @prop {function} RegExp
* @prop {function} Function
* @prop {function} Array
* @prop {function} Number
Lee Rowlands
@larowlan
Jun 15, 2023
Maintainer
do we need another comment here?
Collapse replies
Tavi Toporjinschi
@vasike
Jun 16, 2023
@larowlan
of course ... updated
Please
register
or
sign in
to reply
Please
register
or
sign in
to reply
*/
states
.
Dependent
.
comparisons
=
{
@@ -159,6 +160,15 @@
// The "reference" variable is a comparison function.
return
reference
(
value
);
},
Array
(
reference
,
value
)
{
// Make sure value is an array.
if
(
!
Array
.
isArray
(
value
))
{
return
false
;
}
// The arrays values should match.
return
JSON
.
stringify
(
reference
.
sort
())
===
JSON
.
stringify
(
value
.
sort
());
},
Number
(
reference
,
value
)
{
// If "reference" is a number and "value" is a string, then cast
// reference as a string before applying the strict comparison in
Loading
do we need another comment here?
@larowlan of course ... updated