-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding EditableTable to global scope #2694
Comments
Can't you as well grab the table html element, select the |
@Anubarak I believe I have tried that before and did not succeed. The EditableTable class isn't accessible through the data attribute. If I am wrong, would you be able to show me how to accomplish it? |
@fvaldes33 Sorry for my first post, you are totally right, seems like they are missing their In this case that would be my feature request in order to access every table data |
@Anubarak there’s only one or two Not the first time I come across it, a feature request that implements it on all (major) objects would be sweet. I know little about |
Starting with the next release, editable tables now register themselves on the table element as
Ideally all the UI component classes would store references like this, but a blanket FR like that would probably never actually get implemented, because it would mean we have to find the time to audit all the component classes. So for now just posting specific needs as their own FRs is better :) |
@brandonkelly - Totally understand. Thanks! |
Description
In my use case we are using Google Places API to scrape some images from the web and storing the URLs in a Table field. We are needing to "re init" the table with all the default values in order to use the
addRow
anddeleteRow
functionality. It would be nice if theEditableTable
class would be available globally.Current Code:
https://github.com/craftcms/cms/blob/develop/src/templates/_includes/forms/editableTable.html
Proposed Code:
This way one can say window[tablefieldhandle].addRow() or any of the other methods in that class.
Additional info
The text was updated successfully, but these errors were encountered: