Skip to content
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

Fixed Optional Arguments Issue #4

Merged
merged 3 commits into from
Feb 8, 2020
Merged

Fixed Optional Arguments Issue #4

merged 3 commits into from
Feb 8, 2020

Conversation

davidruvolo51
Copy link
Owner

This request includes a number of changes to the helper functions.

  1. ...: The most important fix is the handling of optional arguments and substituting component defaults when necessary. The arguments style and options can be passed using the .... Several new datatable_helpers functions and objects were created to validate input arguments. First, the datatable_helpers$defaults object contains all of the component defaults for style and options. These lists are used in the new datable_helpers$validate_props function which evaluates objects passed into ... and substitutes missing props and values if missing. There are two new options style$enabled and options$loadDependency. enabled, if FALSE, removes all class attributes from the table and prevents the loading of all dependencies (i.e., css). This is useful for users that may want to convert a table to a pure html markup. The argument loadDependency can also be used to prevent the loading of css files, but still apply class attributes. When enabled is FALSE, it will override any other css setting. Please note the usage of the validation function in the primary function.
  2. Table attributes: The function set_table_attributes was created to process attributes applied to the parent element i.e., <table>. At the moment, this includes id and class, but more will be added in the future.
  3. Helper Function Name Changes: The names of helper functions were changed to be a bit clearer, or more memorable.
  4. Cleaned Up Object Declaration in Primary Function: There were quite a few objects created in the previous version. The primary function was restructured a bit to do things inline or in a helper function.

Also, the package version number was incremented from 0.1.1 to 0.1.2

@davidruvolo51 davidruvolo51 added bug Something isn't working enhancement New feature or request labels Feb 8, 2020
@davidruvolo51 davidruvolo51 self-assigned this Feb 8, 2020
@davidruvolo51 davidruvolo51 added this to In progress in dev via automation Feb 8, 2020
@davidruvolo51 davidruvolo51 merged commit de09fae into master Feb 8, 2020
dev automation moved this from In progress to Done Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant