Search code examples
javascriptreactjsantd

Ant Design - Select - remove/hide dropdown when there is no data


I have tried notFoundContent={undefined} but it does not work. Is there any way else to solve this???

enter image description here


Solution

  • In order to hide dropdown when there is no data, you can use:

    notFoundContent={null}
    

    instead of:

    notFoundContent={undefined}