Hi! I have a column in a dsah AG grid which contains strings like:
items = ["A1", "A10", "A12", "A23", "A4", "A9", "A2"]
And I want to sort them using the numbers following the letter at the beginning. There is always only one letter before the numbers. In python I can do the following:
items = ["A1", "A10", "A12", "A23", "A4", "A9", "A2"]
print(sorted(items, key=lambda x: int(x[1:])))
>>> ['A1', 'A2', 'A4', 'A9', 'A10', 'A12', 'A23']
but I have not found the way to implement such customization with dash AG grid.
I feel like the textMatcher
parameter of javascript AG grid (found here) could do that, but I am not sure this parameter is available in the dash version, and I am not really familiar with javascript so help would be greatly appreciated!
I have thought about using valueGetter
and valueFormatter
. While that would probably allow me to filter with agNumberColumnFilter
ignoring the first character, I believe that would also change the representation of my data in the table, removing the first character.
Thanks!