Logo
Search
Info
Content
Category Navigation
  • 🚀  Updates

  • Zapier and Integromat

  • Survey Forms

  • Scheduled Tasks

  • Zapier Integration

  • Logout Redirect Rules

  • Updates to address field

  • Google Auto Complete

  • Subscription Services

  • Get User Current Location

  • 404 Error on Pin

  • Updated Variables

  • Page Rules

  • Equation Field

  • Date/Time Field Issue

  • Browser Location Access

  • Several Minor Improvements

  • Formula Improvements

  • IP Address White/Black listing

  • Password Complexity

  • Additional User Login Tracking

  • Set Calendar Start Date

  • Searching Connected Fields

  • Search Date fields

  • Data Builder Updates

  • Date Formulas in Basic Formulas

  • "Or" Operator in Form Display Rules

  • View Connected Form Values

  • Create Table from Clipboard

  • Import Data From Clipboard

  • Minor Improvements to the Builder

  • Calendar Resource Component

  • Table Rules

  • Calendar Resource Updates

  • Button Display Rules Options

  • Reordering fields

  • View Active User Sessions

  • Builder Login Emails

  • Custom Pagination

  • Secure Files

  • PDF's With Secure Pages

  • Connection Diagram in Data Builder

  • Add Connected Values

  • Add Components for Related Records

  • More filters for Multi-tenant apps

  • Support Docs

  • Custom Currency Option

  • New Condition

  • Filter tabs in all components

  • PDF Updates

  • Equation Updates: IF/ELSEIF & AND/OR

  • Users Security Update

  • Component Loading Optimization

  • Add components for Logged In User

  • New Unique Validation Conditions

  • Filter connection fields based on 'this' page

  • Bug Fixes

  • Details Component on Parent Pages

  • Updates to Text Formula

  • Updates to import

  • Minor Bug Fixes

  • New Validation Conditions

  • PDF Fixes

  • Logged In User Details In Javascript

  • List View in PDF

  • Builder Updates (Beta)

  • Upcoming Updates

  • Release of our updated builder

  • Custom icon and loading gif

  • More Builder Updates

  • Roadmap, Community and Updates

  • Shared Builder

  • Accessing the Shared Builder

  • Dropbox File Updates

  • Scheduled Tasks Update

  • Link within Card Component

  • File Field Link Updates

  • Record Change Logs

  • Track Deleted Records

  • Several Minor Updates

  • New Search Component

  • Pivot Tables

  • Tadabase Pipes

  • User Login Updates

  • Page Security Updates

  • Tableau Integration

  • Builder Single Sign On (SSO)

  • Remove #! from URL

  • 2 Factor Authentication for the Builder

  • Signup and Login using Google, Facebook, and Twitter

  • Updated Login Component

  • Multi-Step Forms

  • Table Export Updates

  • Javascript API

  • Custom CSS Classes

  • Filter by sub-field values

  • Filter records in child pages with or without a connection

  • Partner Builder API (preview)

  • Javascript Record Details

  • Stripe Subscriptions Update

  • Raw HTML Variables in Emails

  • Meta Tags (SEO) Updates

  • New Export Component

  • Image format for Link and File Fields

  • CSS Classes in Cards

  • New! Select connected fields from table and list views in a form

  • Embeddable Components

  • Reorder Data Tables and Pages

  • Additional options for Date and Time fields in Page Builder

  • Display Options for Multi-Value Dropdowns

  • Add equation fields in Cards and Charts

  • Run Record Rules before or after Validation Rules

  • Data Components: Checkmark for fields that have already been added

  • Action Links - Page Redirects

  • UI Updates for Icon Picker, Page Rules, Page Security, etc.

  • Updates to Formulas and Equations

  • Multi-File Uploads

  • Page Versioning

  • Custom Component

  • Builder UI Updates

  • Details Page in modal pop-up

  • Background Equation Updates

  • Task Logs and Exports

  • Edit Account billing inside Account profile

  • PDF Functionality Updates

  • Connected Values in Pipes

  • Tadabase Achieves SOC 2 Compliance!

  • Advanced Filtering for Complex Formulas

  • New Builder UI

  • Modify CSS from Form Display Rules

  • Open menu pages in a popup

  • Use browser local and session storage in rules

  • PDF Forms

  • New operators in API

  • Name your webhooks

  • E-Commerce / Stripe Checkout

  • Record Debug Logs

  • Record Log Updates

  • Allow whitespace in formulas

  • Embeddable Components

  • Change Pagination Text

  • Display Rules Conditions in Forms

  • Custom Themes

  • New User Menu

  • Button Grouping for Table Components

  • Layout Security

  • Stripe Physical Reader

  • Pagination Location

  • Sorting in Pivot Tables

  • Attachments in cover image of lists

  • Set Login page as homepage

  • QR/Barcode Scanner

  • Filter based on Connection in details page

  • Tadabase Support has switched to Intercom!

  • Improved User Experience for Pipes!

  • Newly Released Pipes - September 2022

  • Newly Released Pipes - October 2022

  • Newly Released Pipes - October 2022

  • Change filter tabs to a dropdown

  • November 2022

  • Updated Tadabase Text Utilities Pipe

  • Ably Pipe

  • TaxJar Pipe

  • New! Upload Files to Your Google Drive

  • New! Post Tweets with an Image using the Twitter Pipe

  • Chart Updates

  • Email Log Updates

  • Built-in Tabs

  • Update! Create Custom Apps in Minutes with Quick Start Wizard

  • Introducing PDF Pages 2.0

  • Perspective API Pipe

  • New Operator in API

  • New JavaScript Callbacks

  • Pages and User API

  • Block IP by CIDR Blocks

  • View connected pages in popup

  • Introducing Plugins!

  • Outgoing Webhook Logs

  • Convert US State name to 2-letter abbreviation

  • Multiple Custom Domains

  • Menu Component - Active Class for current page

  • Updates to the Login Component + Forgot Password Form

  • Upgrading to Delegated Event Handlers for Improved Functionality

  • 404 Error Page Updates

  • Preserve Form Values

Categories
🚀 Updates
Upgrading to Delegated...

Upgrading to Delegated Event Handlers for Improved Functionality

 

As part of our ongoing commitment to provide you with the best experience and ensure seamless functioning of your applications, we recommend an update to how you handle click events in your custom code.

What's the Issue?

If you're using jQuery to bind click events directly to elements, there's a chance these bindings might not work for dynamically added content. The classic method of binding looks like:

javascript code

$("#elementId").click(function(){
// your code here
});

This method works perfectly if `#elementId` is present in the DOM when the page loads. However, if the element is dynamically added afterward (e.g., via an AJAX call, Tadabase components, or any other dynamic method), this binding won't be applied to the new elements.

The Recommended Change

To avoid any such discrepancies and ensure consistent behavior, we suggest shifting to Delegated Event Handlers. This method attaches the click event to a parent element and delegates the event to the target element, ensuring that even dynamically added elements are catered for.

The updated code looks like:

javascriptCopy code

$("body").on("click", "#elementId", function(){
// your code here
});

Here, the event is attached to the `<body>` and checks if the clicked element matches the selector `#elementId`.

Benefits of Making the Change

1. Consistency: Your event handlers will work uniformly, regardless of whether elements are statically present or dynamically added.
2. Performance: Although the change introduces a slight overhead, by targeting the nearest static parent element, you can maintain an optimized performance.
3. Future-Proofing: As Tadabase evolves, we'll likely introduce more dynamic components. Adopting the delegated event handler approach ensures you're prepared for any future updates.
4. New Breaking Features - We have some new features in progress which enables you to gain advanced functionality in the HTML component like pulling in URL variables and more. To do this, the above change must first be implemented.

Next Steps

1. Review your custom code on Tadabase.
2. Identify any direct event bindings that look like the first code snippet.
3. Update them to use the delegated event handler approach, as shown in the second code snippet.
4. Test your applications to ensure smooth functionality.

If you encounter any challenges or have questions about this process, please don't hesitate to reach out to our support team.

We're here to help!

How did we do ?

Previous Article
Updates to the Login Component + Forgot Password Form
Next Article
404 Error Page Updates
Article Navigation
  • What's the Issue?
  • The Recommended Change
  • Benefits of Making the Change
  • Next Steps
  • Back to top
    API
    100% Operational
    Apps
    100% Operational
    Builder
    100% Operational
    Overall Status
    100% Operational