Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ui_patterns
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ui_patterns
Merge requests
!348
Resolve
#3512018
"2.0.1 make componenent"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve
#3512018
"2.0.1 make componenent"
issue/ui_patterns-3512018:3512018-2.0.1-make-componenent
into
2.0.x
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Mikael Meulle
requested to merge
issue/ui_patterns-3512018:3512018-2.0.1-make-componenent
into
2.0.x
1 month ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
Closes
#3512018
0
0
Merge request reports
Compare
2.0.x
2.0.x (base)
and
latest version
latest version
7bf7ff1e
1 commit,
1 month ago
2 files
+
11
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Element/ComponentElementBuilder.php
+
2
−
2
Options
@@ -91,7 +91,7 @@ class ComponentElementBuilder implements TrustedCallbackInterface {
$build
=
$source
->
alterComponent
(
$build
);
$prop_type
=
$definition
[
'ui_patterns'
][
'type_definition'
];
$data
=
$source
->
getValue
(
$prop_type
);
$this
->
moduleHandler
->
alter
(
'ui_patterns_source_value'
,
$data
,
$source
);
$this
->
moduleHandler
->
alter
(
'ui_patterns_source_value'
,
$data
,
$source
,
$configuration
);
if
(
empty
(
$data
)
&&
$prop_type
->
getPluginId
()
!==
'attributes'
)
{
// For JSON Schema validator, empty value is not the same as missing
// value, and we want to prevent some of the prop types rules to be
@@ -186,7 +186,7 @@ class ComponentElementBuilder implements TrustedCallbackInterface {
}
$build
=
$source
->
alterComponent
(
$build
);
$source_value
=
$source
->
getValue
(
$slot_prop_type
)
??
[];
$this
->
moduleHandler
->
alter
(
'ui_patterns_source_value'
,
$source_value
,
$source
);
$this
->
moduleHandler
->
alter
(
'ui_patterns_source_value'
,
$source_value
,
$source
,
$source_configuration
);
if
(
Element
::
isRenderArray
(
$source_value
))
{
$build
[
"#slots"
][
$slot_id
][]
=
$this
->
isSingletonRenderArray
(
$source_value
)
?
array_values
(
$source_value
)[
0
]
:
$source_value
;
}
Loading