hi guys !!
I was grateful whenever I got the advice from here!!
in my dash table, (it works well)
I find something wrong, when I try to multi option in a col to filter.(I apply this option, sort_action=“native”,)
when I filter one word in a col, it works.
however Python-Driven Filtering, Paging, Sorting | Dash for Python Documentation | Plotly, this example page,
I tested same thing(I filtered As|Eu then it worked) , it worked!
so, my question is that, should I make a cushion filtering code. like below… ?
or I am Korea, so it depends on the language or etc… ?
I love this option, , sort_action=“native” !!!
but it is not be able to filter multi words, I should make custom input filter.
help me ~!!
operators = [['ge ', '>='], ['le ', '<='], ['lt ', '<'], ['gt ', '>'], ['ne ', '!='], ['eq ', '='], ['contains '], ['datestartswith ']]def split_filter_part(filter_part):
for operator_type in operators:
for operator in operator_type:
if operator in filter_part:
name_part, value_part = filter_part.split(operator, 1)
name = name_part[name_part.find(‘{’) + 1: name_part.rfind(‘}’)]
value_part = value_part.strip()
v0 = value_part[0]
if (v0 == value_part[-1] and v0 in ("'", '"', '`')):
value = value_part[1: -1].replace('\\' + v0, v0)
else:
try:
value = float(value_part)
except ValueError:
value = value_part
# word operators need spaces after them in the filter string,
# but we don't want these later
return name, operator_type[0].strip(), value
return [None] * 3. <--- this is from the example page.