File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
vaadin-grid-filter/src/main/java/software/xdev/vaadin/gridfilter Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -310,13 +310,26 @@ public GridFilter<T> clearFilterComponentSuppliers()
310
310
return this ;
311
311
}
312
312
313
+ /**
314
+ * @apiNote This method should not be used if name is dynamic (e.g. translated).<br/>In this case use
315
+ * {@link #withFilterableField(String, String, Function, Class)}
316
+ */
313
317
public <S > GridFilter <T > withFilterableField (
314
318
final String name ,
315
319
final Function <T , S > keyExtractor ,
316
320
final Class <S > clazz )
317
321
{
318
- final String identifier
319
- return this .withFilterableField (name , null , keyExtractor , clazz );
322
+ return this .withFilterableField (
323
+ name ,
324
+ name .chars ()
325
+ .filter (c -> Character .isLetter (c ) || Character .isDigit (c ))
326
+ .collect (
327
+ () -> new StringBuilder (name .length ()),
328
+ StringBuilder ::appendCodePoint ,
329
+ StringBuilder ::append )
330
+ .toString (),
331
+ keyExtractor ,
332
+ clazz );
320
333
}
321
334
322
335
public <S > GridFilter <T > withFilterableField (
You can’t perform that action at this time.
0 commit comments