File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
vaadin-simple-grid-filter/src/main/java/software/xdev/vaadin Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -344,11 +344,13 @@ private void onAcceptFilter()
344
344
final boolean deletable ;
345
345
final boolean editable ;
346
346
347
- // Check if it's an initial condition
348
- if (this .editingBadgeId != null && !this .editingBadgeId .equals (NO_BADGE_ID_STRING ))
347
+ if (this .deletingBadgeEnabled != null && this .editingBadgeEnabled != null )
349
348
{
350
349
deletable = this .deletingBadgeEnabled ;
351
350
editable = this .editingBadgeEnabled ;
351
+
352
+ this .deletingBadgeEnabled = null ;
353
+ this .editingBadgeEnabled = null ;
352
354
}
353
355
else
354
356
{
@@ -426,13 +428,14 @@ private void onAcceptFilter()
426
428
// Make the cancel button invisible
427
429
this .btnCancelFilter .setVisible (false );
428
430
429
- // Just activated when the url parameters are activated
431
+ // Needed to save state of the condition if it was editable/deletable before editing
432
+ this .editingBadgeEnabled = badge .isBtnEditEnabled ();
433
+ this .deletingBadgeEnabled = badge .isBtnDeleteEnabled ();
434
+
435
+ // Just activated when the url parameters are enabled
430
436
if (!this .identifier .isBlank ())
431
437
{
432
438
this .editingBadgeId = badge .getBadgeId ();
433
- // Needed for the acceptFilterBtn
434
- this .editingBadgeEnabled = badge .isBtnEditEnabled ();
435
- this .deletingBadgeEnabled = badge .isBtnDeleteEnabled ();
436
439
}
437
440
438
441
// Remove filter, update grid
You can’t perform that action at this time.
0 commit comments