fix: 🐛 Fallback to cell content when html is not available
This commit is contained in:
parent
164979f7d6
commit
96c7b723da
@ -30,7 +30,7 @@ function getFilterMethod(filter) {
|
|||||||
contains(keyword, cells) {
|
contains(keyword, cells) {
|
||||||
return cells
|
return cells
|
||||||
.filter(cell => {
|
.filter(cell => {
|
||||||
const hay = String(stripHTML(cell.html) || '').toLowerCase();
|
const hay = String(stripHTML(cell.html || '') || cell.content || '').toLowerCase();
|
||||||
const needle = (keyword || '').toLowerCase();
|
const needle = (keyword || '').toLowerCase();
|
||||||
return !needle || hay.includes(needle);
|
return !needle || hay.includes(needle);
|
||||||
})
|
})
|
||||||
@ -68,8 +68,8 @@ function getFilterMethod(filter) {
|
|||||||
return filterMethodMap[filter.type];
|
return filterMethodMap[filter.type];
|
||||||
}
|
}
|
||||||
|
|
||||||
function guessFilter(keyword) {
|
function guessFilter(keyword = '') {
|
||||||
if (keyword.length === 1) return {};
|
if (keyword.length === 0) return {};
|
||||||
|
|
||||||
if (keyword.startsWith('>')) {
|
if (keyword.startsWith('>')) {
|
||||||
if (isNumber(keyword.slice(1))) {
|
if (isNumber(keyword.slice(1))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user