JavaScript Data GridEmpty Data State

Display empty data state overlays and provide user feedback when your data grid has no data to display using the Empty Data State plugin.

Overview

The Empty Data State plugin provides a user-friendly overlay system for Handsontable when there's no data to display. It automatically detects when your table is empty or when all data is hidden by filters, and displays an appropriate message with optional action buttons.

With simplicity and effectiveness in mind, the empty data state plugin was designed to provide a consistent user experience with customizable appearance and behavior. It automatically integrates with the Filters plugin to provide context-aware messages and actions.

Basic configuration

To enable the Empty Data State plugin, set the emptyDataState option to true or provide a configuration object.

    Custom configuration

    The empty data state supports customization of the title, description, and action buttons.

      Dynamic messages based on source

      You can provide different messages based on the source of the empty state (e.g., filters vs. no data). This allows for more contextual user guidance.

        Localize empty data state

        Translate default empty data state labels using the global translations mechanism. The empty data state plugin introduces the following keys to the language dictionary that you can use to translate the empty state UI:

        Key Default Value
        EMPTY_DATA_STATE_TITLE 'No data available'
        EMPTY_DATA_STATE_DESCRIPTION 'There's nothing to display yet.'
        EMPTY_DATA_STATE_TITLE_FILTERS 'No results found'
        EMPTY_DATA_STATE_DESCRIPTION_FILTERS 'It looks like your current filters are hiding all results.'
        EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET 'Reset filters'

        To learn more about the translation mechanism, see the Languages guide.