Skip to content

Commit

Permalink
Merge branch 'refs/heads/1.0' into 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fashxp committed Aug 27, 2024
2 parents e463b0d + 3a9f3db commit e7e7924
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/CoreExtensions/ObjectData/IndexFieldSelection.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class IndexFieldSelection
public string $field;

/**
* @var string|string[]|null
* @var string|string[]|int|null
*/
public string|array|null $preSelect;
public string|array|int|null $preSelect;

/**
* @param string|string[] $preSelect
* @param string|string[]|int $preSelect
*/
public function __construct(?string $tenant, string $field, array|string|null $preSelect)
public function __construct(?string $tenant, string $field, array|string|int|null $preSelect)
{
$this->field = $field;
$this->preSelect = $preSelect;
Expand All @@ -50,15 +50,15 @@ public function getField(): string
/**
* @param string|string[] $preSelect
*/
public function setPreSelect(array|string $preSelect): void
public function setPreSelect(array|string|int $preSelect): void
{
$this->preSelect = $preSelect;
}

/**
* @return string|string[]|null
*/
public function getPreSelect(): array|string|null
public function getPreSelect(): array|string|int|null
{
return $this->preSelect;
}
Expand Down
2 changes: 1 addition & 1 deletion src/FilterService/FilterType/AbstractFilterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected function getTemplate(AbstractFilterDefinitionType $filterDefinition):
return $template;
}

protected function getPreSelect(AbstractFilterDefinitionType $filterDefinition): array|string|null
protected function getPreSelect(AbstractFilterDefinitionType $filterDefinition): array|string|int|null
{
$field = $filterDefinition->getField();
if ($field instanceof IndexFieldSelection) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ pimcore.object.tags.indexFieldSelection = Class.create(pimcore.object.tags.selec
load: function(store) {
if(this.data) {
if(this.preSelectCombobox.rendered) {
this.preSelectCombobox.setValue(this.data.preSelect);
this.preSelectCombobox.setValue(this.data.preSelect.split(',').map(Number));
} else {
this.preSelectCombobox.addListener("afterRender", function() {
this.preSelectCombobox.setValue(this.data.preSelect);
this.preSelectCombobox.setValue(this.data.preSelect.split(',').map(Number));
}.bind(this));
}
}
Expand Down Expand Up @@ -239,10 +239,10 @@ pimcore.object.tags.indexFieldSelection = Class.create(pimcore.object.tags.selec

if(this.fieldConfig.multiPreSelect == 'local_single' || this.fieldConfig.multiPreSelect == 'local_multi') {
if(this.preSelectCombobox.rendered) {
this.preSelectCombobox.setValue(this.data.preSelect);
this.preSelectCombobox.setValue(this.data.preSelect.split(',').map(Number));
} else {
this.preSelectCombobox.addListener("afterRender", function() {
this.preSelectCombobox.setValue(this.data.preSelect);
this.preSelectCombobox.setValue(this.data.preSelect.split(',').map(Number));
}.bind(this));
}
}
Expand Down

0 comments on commit e7e7924

Please sign in to comment.