Cell dropdown to close via a hook

Tags: #<Tag:0x00007f0b038683b8>

Hi, good afternoon! :slight_smile:

I have a column of type ‘dropdown’. It’s configured allowInvalid = false.
What I want to happen is

  1. When the user supplies an invalid value
  2. afterValidate - if invalid, I set state attrs - hasError = true, row = prop, prop = prop
  3. afterOnCellMouseOut - if the state attr hasError = true
  • I invoke setDataAtRowProp(row, prop, ‘’) - :heavy_check_mark:
  • I set state attrs - hasError = false, row = -1, prop = ‘’ - :heavy_check_mark:
  • close the dropdown - :question: is this even possible?

Thank you!

Hey @noel.benson.sun.uy

Once you set up allowInvalid to false editor won’t close. You need to have the true for this option. It doesn’t force you to change the logic followed by the rest of the steps.

If I misunderstood the case or you have additional questions feel free to share more information.

Thank you @aleksandra_budnik

You understood correctly. I am thinking of a workaround for users not to be stuck with the cell.

Thanks for this!