Ask AI
Skip to main content

Clear horizontal list

Function: Clear horizontal list​

This function allows you to quickly remove all items from a specific horizontal list component on your application page. It's useful when you need to reset a list, empty a display, or prepare a list for new content.

Input​

  • List UI Element (PART): The specific horizontal list component on your page that you want to empty. This is a visual element designed to display items side-by-side.

Output​

This action does not return any specific data. Its primary effect is to clear all items from the specified horizontal list component on your application's user interface.

Execution Flow​

Real-Life Examples​

Here are some practical ways you can use the "Clear horizontal list" function in your application:

Imagine you have a product page with a "Related Products" section displayed as a horizontal list. After a user applies new filters, you want to clear the old related products before displaying the new ones.

  • Inputs:
    • List UI Element: "Related Products Gallery"
  • Result: All product cards are removed from the "Related Products Gallery" on the page, making it empty and ready to be populated with products matching the new filters.

Example 2: Emptying a Shopping Cart Display​

In an e-commerce application, after a customer successfully completes an order, you might want to clear the visual representation of their shopping cart.

  • Inputs:
    • List UI Element: "Shopping Cart Items Display"
  • Result: All items previously shown in the "Shopping Cart Items Display" are removed, visually indicating that the cart is now empty.

Example 3: Preparing a Task Board for a New Project​

If you have a project management tool with a horizontal list showing "Upcoming Tasks" for the current project, you might want to clear this list when starting a brand new project.

  • Inputs:
    • List UI Element: "Project Task Board - Upcoming Tasks"
  • Result: The "Project Task Board - Upcoming Tasks" list is emptied, allowing you to add new tasks specific to the new project without old tasks cluttering the view.