Twake
⬅️ Go on twake
  • ☀️ Twake
  • Getting started
    • ▶️Use Twake on twake.app
    • 🏗️Install on your server
      • 🎡Scale with Twake
    • ⚙️Configuration
      • 🔒Security
      • 🔗Custom domain + HTTPS
        • Apache2 configuration
      • 💌Configure mail server
      • 🎨Customisation
      • 🔌Connectors and plugins
      • 👨‍💻 Authentication modes
        • Using Keycloak (LDAP, OpenID and more)
        • Installing Twake with LemonLDAP (LDAP, OpenID and more)
  • How to use it
    • 👋Welcome to Twake !
    • 🧰Console
      • Users
    • 🏢Company & workspace
      • Invite user from Chat
      • Rights
    • 💠Applications
      • 💬Chat
        • Channels
        • Message
      • 📂Drive
        • File and folder
        • Share file with public link
      • 📆Calendar
      • ✅Tasks
      • 🔃Connectors
        • n8n
    • 🖥️Desktop and mobile app
    • 🔒Privacy
  • Developers API
    • 🏠Home
    • 🥇Getting started
      • Create your first application
      • Authenticate with Postman
      • Send a message with your application
      • Trigger action from command
    • ⚙️Application settings
      • Api
      • Display
      • Privileges
      • Identity
    • 📖API Reference
      • Webhook
      • Drive
      • Message
        • DELETE Request
        • POST Request
      • Authentication
    • 🧱Blocks
  • Internal Documentation
    • 🥇Get started
    • 🎨Twake Ecosystem Guidelines
    • 📚Our stack
    • 🧱Backend and APIs
      • 🔑(WIP) Authentication
      • 👥Users and workspaces
      • 🍎Applications
        • Database models
        • REST APIs
      • 🎩Channels and tabs
        • Database models
      • 💬Messages
        • Database models
      • 📄Files
        • Database models
        • REST APIs
        • Resumable.js
      • 📲Notifications
        • Database models
      • 🛠️Twake service development
        • What is a service in Twake ?
        • Create a new service
        • Platform/Technical services
          • Database ORM platform service
    • 🖥️Web, desktop and mobile
      • Table
      • ObjectModal
        • ObjectModalTitle
        • ObjectModalSeparator
        • ObjectModalSectionTitle
        • ObjectModalFormTitle
      • UserListManager
      • MediumPopupManager
      • MenuManager
    • 🎭Translation
Powered by GitBook
On this page

Was this helpful?

  1. Internal Documentation
  2. Web, desktop and mobile

Table

Create a table

Usage

import Table from 'components/Table/Table.js';
<Table /> 

Props

name

Description

Type

Default

columns

ReactNode

null

onAdd

If defined a add button appear and clicking on it call this callback.

Function

null

addText

Button content

ReactNode

null

onSearch

Called when search bar is changed. Return a Promise that resolve with a list of users. Argument is (query: string, maxResult: number)=>{return new Promise(...)}

Function

null

onRequestNextPage, onRequestPreviousPage

(token: string, maxResult: number)=>{return new Promise(...)}

Function

null

rowKey

(row)=>return row.id

Function

null

Functions (callable on the component from parent)

name

Description

Type

newElements(elements)

Add new rows at the beginning of the table.

Function

Internal implementation

  • If no data in table, set loading to true, call onRequestNextPage without offset token.

  • If next page button is clicked, get last row token, set Table to loading, and requestNextPage.

  • When recieve result in requestNextPage, set loading to false and update data.

  • Table must memorize already loaded pages to be faster

  • Table must detect when request a page and no result is returned in this case disable corresponding button.

PreviousWeb, desktop and mobileNextObjectModal

Last updated 4 years ago

Was this helpful?

🖥️