fix: 🐛 Apply range filter only for numbers (#176)

This commit is contained in:
Suraj Shetty 2023-09-11 13:05:09 +05:30 committed by GitHub
parent 17cddc05f1
commit 7ee8ca9304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2018 Frappé Technologies Pvt. Ltd. <developers@frappe.io>
Copyright (c) 2018 Frappe Technologies Pvt. Ltd. <developers@frappe.io>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Frappé DataTable</title>
<title>Frappe DataTable</title>
<style>
body {
font-family: 'Tahoma';
@ -17,7 +17,7 @@
</head>
<body>
<h1>Frappé DataTable</h1>
<h1>Frappe DataTable</h1>
<button onclick="datatable.render()">Render Table</button>
<button onclick="datatable.refresh()">Refresh Data</button>
<button onclick="switchToTreeView()" data-action="treeview">TreeView</button>

View File

@ -189,7 +189,7 @@ function guessFilter(keyword = '') {
}
}
if (keyword.split(':').length === 2) {
if (keyword.split(':').length === 2 && keyword.split(':').every(v => isNumber(v.trim()))) {
compareString = keyword.split(':');
return {
type: 'range',