Skip to content

Add initWidth argument to colDef#425

Open
nteetor wants to merge 1 commit into
glin:mainfrom
nteetor:main
Open

Add initWidth argument to colDef#425
nteetor wants to merge 1 commit into
glin:mainfrom
nteetor:main

Conversation

@nteetor
Copy link
Copy Markdown

@nteetor nteetor commented May 25, 2026

Description

This PR adds an initWidth column to the colDef function. As described in #223 and #374 there isn't currently a way to specify a column's initial width and allow column resizing.

I adjusted the javascript column logic to set width to initWidth, if specified. The behavior of the other width arguments remain unchanged.

Changes

  • Added initWidth argument to colDef()
  • Added argument checks in colDef() for the following,
    • initWidth is null or numeric
    • initWidth and width cannot both be specified
    • if specified, initWidth is greater than or equal to minWidth
    • if specified, initWidth is less than or equal to minWidth
  • Added R tests
    • confirm argument checks listed above
  • Added Javascript tests
    • confirm initial width does not affect min or max width
    • initial width leaves a resizable column as resizable

Comment thread srcjs/columns.js Outdated
@nteetor nteetor marked this pull request as ready for review May 27, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant