Skip to content

Add queryParamsStore #38

@techniq

Description

@techniq
  • Support simple types (numbers, strings, booleans)
  • Support objects
  • Support arrays
    • Return array even if single item
    • Arrays of simple types
    • Arrays of objects
  • Handle datatype changing when only a single vs multiple selected (ex. select with a single vs multiple values)
  • Provide better errors when config not found (at least include param name)
  • Support updating single param with queryParamsStore
    • Either support property and only update those with keys passed (require null / undefined to remove) or expose function from store to set
  • Support specifying pushState (browser back) vs replaceState
  • Attempt to guess paramType based on default value and/or current params set?
    • Might be confusing when breaks in certain conditions
  • Consider supporting Number and [Number] along with 'number' and 'number[]' (etc)?
    • Support both formats?
    • What about json (JSON), object (Object)?
    • What about date vs datetime?
      • Maybe Date is bound to datetime and date is handled by passing in an implementation object with encode/decode (see below)
    • Support a custom format in the future (UTC date vs local date, etc)
      • Maybe passing in an implementation object with encode/decode (see below)
  • Consider supporting explicit object with {encode: ..., decode: ....}?
  • Differentiate between null and undefined
    • Should only undefined delete the value (null is persisted)? Example: active/inactive/all toggles

Useful links

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions