datagrid
datagrid copied to clipboard
FilterText filtering with quotation marks
Hi, could be changed behavior in filterText to filtering with quotation marks? Google like, for example: "not splitted search" and next splitted words
Because simple split by spacing is not enought.
Better could be something like this:
public function getSplittedWords($value)
{
if ($this->hasSplitWordsSearch() === false) {
return [$value];
} else {
preg_match_all('/([^\s"\']+)|"([^"]*)"|\'([^\']*)\'/', $value, $m);
return array_filter(array_merge($m[1], $m[2], $m[3]));
}
}
Regular expression from https://stackoverflow.com/a/366532