- Issue created by @pdureau
- Merge request !11649Merge component ['#attributes'] with the ['#props']['attributes']. → (Open) created by dipakmdhrm
- 🇫🇷France goz
Looks great.
What's about a test to confirm props attributes will keep its values in case keys exist in both.$build = [ '#type' => 'component', '#component' => 'sdc_theme_test:my-card', '#props' => [ 'header' => 'Drupal.org', 'attributes' => new Attribute([ 'foo' => 'bar', ]), ], '#attributes' => [ 'foo => 'third', ], ];
I think in this case, foo should still be bar.
And what's about attribute with array like classes for example ?
$build = [ '#type' => 'component', '#component' => 'sdc_theme_test:my-card', '#props' => [ 'header' => 'Drupal.org', 'attributes' => new Attribute([ 'foo' => ['bar', 'ter'], ]), ], '#attributes' => [ 'foo' => ['quater'], ], ];
- 🇫🇷France Grimreaper France 🇫🇷
MR rebased and updated regarding comment 7.
- 🇫🇷France pdureau Paris
Oops, it was not something to merge yet. Merge train cancelled.