Skip to content

Commit

Permalink
Merge pull request #24810 from colemanw/searchSegmentFilter
Browse files Browse the repository at this point in the history
SearchKit - Expose SearchSegment fields as filters
  • Loading branch information
colemanw authored Nov 1, 2022
2 parents f0990c0 + f376230 commit 89aaf7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function modifySpec(RequestSpec $spec) {
$field->setOptions(array_column($set['items'], 'label'));
$field->setSuffixes(['label']);
$field->setSqlRenderer([__CLASS__, 'renderSql']);
$field->setInputType('Select');
$spec->addFieldSpec($field);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function testRangeSearchSegment() {

$this->assertEquals('Giving Tier', $getField['label']);
$this->assertEquals('Extra', $getField['type']);
$this->assertEquals('Select', $getField['input_type']);
$this->assertEquals(['Low ball', 'Minor league', 'Major league', 'Heavy hitter'], $getField['options']);

$params = [
Expand Down

0 comments on commit 89aaf7f

Please sign in to comment.