Skip to content

Commit

Permalink
fixing website hyperlinks bug where upon navigating to a particular s…
Browse files Browse the repository at this point in the history
…ection via the URL or using Algolia - hyperlinks on the same page to other pages would not work
  • Loading branch information
OvidijusParsiunas committed Nov 5, 2023
1 parent fe6986d commit 4c7a498
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 84 deletions.
40 changes: 20 additions & 20 deletions website/docs/docs/column.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Properties related to table columns.

- Type: {<br />
&nbsp;&nbsp;&nbsp;&nbsp; `headerName: string`, <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`defaultColumnTypeName?: string`](./columnType#defaultColumnTypeName), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`availableDefaultColumnTypes?: DEFAULT_COLUMN_TYPES[]`](./columnType#availableDefaultColumnTypes), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`customColumnTypes?: ColumnType[]`](./columnType#customColumnTypes), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`defaultText?: string|number`](./content#defaultText), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`isDefaultTextRemovable?: boolean`](./content#isDefaultTextRemovable), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`cellStyle?: cellStyle`](./content#cellStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`isCellTextEditable?: boolean`](./content#isCellTextEditable), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`defaultColumnTypeName?: string`](/docs/columnType#defaultColumnTypeName), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`availableDefaultColumnTypes?: DEFAULT_COLUMN_TYPES[]`](/docs/columnType#availableDefaultColumnTypes), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`customColumnTypes?: ColumnType[]`](/docs/columnType#customColumnTypes), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`defaultText?: string|number`](/docs/content#defaultText), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`isDefaultTextRemovable?: boolean`](/docs/content#isDefaultTextRemovable), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`cellStyle?: cellStyle`](/docs/content#cellStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`isCellTextEditable?: boolean`](/docs/content#isCellTextEditable), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`isColumnResizable?: boolean`](#isColumnResizable), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`headerStyles?: headerStyles`](./header#headerStyles), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`isHeaderTextEditable?: boolean`](./header#isHeaderTextEditable), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`headerIconStyle?: HeaderIconStyle`](./header#HeaderIconStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`headerStyles?: headerStyles`](/docs/header#headerStyles), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`isHeaderTextEditable?: boolean`](/docs/header#isHeaderTextEditable), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`headerIconStyle?: HeaderIconStyle`](/docs/header#HeaderIconStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`columnDropdown?: ColumnDropdownSettings`](#ColumnDropdownSettings) <br />
}[]

Expand Down Expand Up @@ -121,8 +121,8 @@ import Tabs from '@theme/Tabs';
- Type: `boolean`
- Default: _true_

Determines if columns can be resized via the use of the overlay between header cells. When `width` is defined in [`cellStyle`](./content#cellStyle)
and [`tableStyle`](./table#tableStyle) properties, and this is set to _true_ - the column `width` will be automatically overwritten to
Determines if columns can be resized via the use of the overlay between header cells. When `width` is defined in [`cellStyle`](/docs/content#cellStyle)
and [`tableStyle`](/docs/table#tableStyle) properties, and this is set to _true_ - the column `width` will be automatically overwritten to
meet the set table `width`. However if this is set to _false_, columns will permanently hold the initially set `width`.

#### Example
Expand Down Expand Up @@ -231,7 +231,7 @@ Column width resizer overlay background color style for hover and click events.
### `columnDropdown` {#columnDropdown}

- Type: {<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`displaySettings?: DropdownDisplaySettings`](./sharedTypes#DropdownDisplaySettings), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`displaySettings?: DropdownDisplaySettings`](/docs/sharedTypes#DropdownDisplaySettings), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ColumnDropdownSettings`](#ColumnDropdownSettings) <br />
} <br />
- Default: {<br />
Expand Down Expand Up @@ -373,9 +373,9 @@ Maximum number of columns allowed (not including the index and add columns colum
- Type: `boolean`
- Default: _true_

When [`tableStyle`](./table#tableStyle) is set with a `width` or `maxWidth` property to limit its size, the insertion of new columns will
When [`tableStyle`](/docs/table#tableStyle) is set with a `width` or `maxWidth` property to limit its size, the insertion of new columns will
cause all existing column widths to automatically be reduced to make space for the new ones (except columns set with `isColumnResizable` as _false_
inside [`cellStyle`](./content#cellStyle) of the [`customColumnsSettings`](#customColumnsSettings) object). This can however become problematic when
inside [`cellStyle`](/docs/content#cellStyle) of the [`customColumnsSettings`](#customColumnsSettings) object). This can however become problematic when
existing column widths eventually become too narrow\* and their widths cannot be reduced any further. <br />
When `preserveNarrowColumns` is _true_ and column widths are too narrow\*, the table width will be increased to allow new columns to be inserted. <br />
When `preserveNarrowColumns` is _false_ and column widths are too narow\*, no new columns will be allowed to be inserted.
Expand Down Expand Up @@ -499,7 +499,7 @@ _\*Minimal column size is recognised as 33px_
</Tabs>

:::info
Please note that when [`tableStyle`](./table#tableStyle) contains a `width` or `maxWidth` property with a _%_ or _vw_ unit and the window width is changed - if columns
Please note that when [`tableStyle`](/docs/table#tableStyle) contains a `width` or `maxWidth` property with a _%_ or _vw_ unit and the window width is changed - if columns
cannot be reduced any further the excess ones will not be removed even if `preserveNarrowColumns` is set to _false_ to prevent loss of data.
:::

Expand All @@ -511,7 +511,7 @@ cannot be reduced any further the excess ones will not be removed even if `prese
- Default: _true_

A toggle for a clickable '+' column on the right which is used to add new empty columns. <br />
You can set the add new column style via [`frameComponentsStyles`](./table#frameComponentsStyles).
You can set the add new column style via [`frameComponentsStyles`](/docs/table#frameComponentsStyles).

#### Example

Expand Down Expand Up @@ -568,11 +568,11 @@ You can set the add new column style via [`frameComponentsStyles`](./table#frame

A toggle for the index column on the left. <br />
When `wrapIndexCellText` is set to _true_, the index column width will be static and any overflowing digits inside its cells will be wrapped within its boundaries. This is
useful in a scenario where `width`/`maxWidth` is set within [`tableStyle`](./table#tableStyle) and the addition of any more columns would cause the width to be breached
useful in a scenario where `width`/`maxWidth` is set within [`tableStyle`](/docs/table#tableStyle) and the addition of any more columns would cause the width to be breached
due to all columns having the mimimal width of _33px_. Hence by keeping index column width narrow - more columns can be added without breaching the set `width`/`maxWidth`.
If `wrapIndexCellText` is set to _false_ and [`preserveNarrowColumns`](#preserveNarrowColumns) is set to _true_ - if the table width is also about to be breached,
`wrapIndexCellText` will be automatically set to _true_ and the index width will be set back to the initial width. <br />
You can set the index column style via [`frameComponentsStyles`](./table#frameComponentsStyles).
You can set the index column style via [`frameComponentsStyles`](/docs/table#frameComponentsStyles).

#### Example

Expand Down Expand Up @@ -621,7 +621,7 @@ You can set the index column style via [`frameComponentsStyles`](./table#frameCo
</Tabs>

:::note
If [`dataStartsAtHeader`](./header#dataStartsAtHeader) is _true_, the index count will start from the header row, otherwise it will start from the first data row. <br />
If [`dataStartsAtHeader`](/docs/header#dataStartsAtHeader) is _true_, the index count will start from the header row, otherwise it will start from the first data row. <br />
:::
:::note
Please note that cell unwrapping detection is not supported and once the index column is wrapped via `wrapIndexCellText` it will stay in this
Expand Down
12 changes: 6 additions & 6 deletions website/docs/docs/columnType.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ more than one of these is provided - only the first one will be used in that ord
- Type: {<br />
&nbsp;&nbsp;&nbsp;&nbsp; `func: (cellText: string) => boolean`, <br />
&nbsp;&nbsp;&nbsp;&nbsp; `setTextToDefaultOnFail?: boolean`, <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`failedStyle?: NoDimensionCSSStyle`](./sharedTypes#NoDimensionCSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`failedStyle?: NoDimensionCSSStyle`](/docs/sharedTypes#NoDimensionCSSStyle), <br />
}
- Default: { _setTextToDefaultOnFail: true_ }

Used to enforce cell text validation. This operates only in the data cells and not the header. <br />
The `func` property takes a function that will be called when the text is initially placed in the cell and when
it changes. The function must return _true_ if the text is correct or _false_ if it is incorrect.
`setTextToDefaultOnFail` will reset the cell text to value defined inside [`defaultText`](./content#defaultText)
`setTextToDefaultOnFail` will reset the cell text to value defined inside [`defaultText`](/docs/content#defaultText)
if the function returns _false_. <br />
`failedStyle` is used to change the cell styling if the function returns _false_.

Expand Down Expand Up @@ -338,7 +338,7 @@ if the function returns _false_. <br />

- Type: {<br />
&nbsp;&nbsp;&nbsp;&nbsp; `changeTextFunc?: (cellText: string, rowIndex: number) => string|number`, <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`changeStyleFunc?: (cellText: string, rowIndex: number) => NoDimensionCSSStyle`](./sharedTypes#NoDimensionCSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp; [`changeStyleFunc?: (cellText: string, rowIndex: number) => NoDimensionCSSStyle`](/docs/sharedTypes#NoDimensionCSSStyle), <br />
}

Augments cell after its text is changed. `changeTextFunc` is a function that processes cell text and
Expand Down Expand Up @@ -523,8 +523,8 @@ are equal, or a positive value (> 0) if cellText1 is greater than cellText2.
&nbsp;&nbsp;&nbsp;&nbsp; [`reusableIconName?: DEFAULT_COLUMN_TYPES`](#DEFAULT_COLUMN_TYPES), <br />
&nbsp;&nbsp;&nbsp;&nbsp; `svgString?: string`, <br />
&nbsp;&nbsp;&nbsp;&nbsp; `containerStyles?`: { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [`columnDropdown?: CSSStyle`](./sharedTypes#CSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [`headerCorrections?: CSSStyle`](./sharedTypes#CSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [`columnDropdown?: CSSStyle`](/docs/sharedTypes#CSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [`headerCorrections?: CSSStyle`](/docs/sharedTypes#CSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp;}}

Defines column type icon properties. <br />
Expand Down Expand Up @@ -915,7 +915,7 @@ This type automatically comes with a predefined [`customTextProcessing`](#Custom
uses _""_, _"0"_, _"00"_ and _"false"_ values to represent the checkbox as unchecked and all the other values as checked. You can overwite it
with your own `changeTextFunc` function that would return a string of _"true"_ when the checkbox should be checked and _"false"_ when it should
be unchecked. <br />
The [`onCellUpdate`](./events#onCellUpdate) and [`onContentUpdate`](./events#onContentUpdate) properties will return string _"true"_ if the checkbox
The [`onCellUpdate`](/docs/events#onCellUpdate) and [`onContentUpdate`](/docs/events#onContentUpdate) properties will return string _"true"_ if the checkbox
is checked and _"false"_ if unchecked.

#### Example
Expand Down
18 changes: 9 additions & 9 deletions website/docs/docs/content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ Removes default text when a cell containg one is focused.

Defines the default style for table cells. <br />
This object contais all `CSSStyle` properties except `minWidth`, `maxWidth`, `height`, `minHeight` and `maxHeight`. <br />
The `width` property supports _px_ and _%_ measurements, however when using _%_ - the [`tableStyle`](./table#tableStyle) object should have its `width` property
The `width` property supports _px_ and _%_ measurements, however when using _%_ - the [`tableStyle`](/docs/table#tableStyle) object should have its `width` property
set as otherwise the cells will not be able to calculate a relative width. Additionally, when [`cellStyle`](#cellStyle) - `width` and
[`tableStyle`](./table#tableStyle) - `width` are defined and [`isColumnResizable`](./column#isColumnResizable) is set to _true_, the [`cellStyle`](#cellStyle) - `width`
will be overriden to reach the set table `width`, hence to prevent this make sure to set [`isColumnResizable`](./column#isColumnResizable) to _false_.
[`tableStyle`](/docs/table#tableStyle) - `width` are defined and [`isColumnResizable`](/docs/column#isColumnResizable) is set to _true_, the [`cellStyle`](#cellStyle) - `width`
will be overriden to reach the set table `width`, hence to prevent this make sure to set [`isColumnResizable`](/docs/column#isColumnResizable) to _false_.

#### Example

Expand Down Expand Up @@ -248,23 +248,23 @@ will be overriden to reach the set table `width`, hence to prevent this make sur
</Tabs>

:::info
If you wish to set the header cell style please use the [`headerStyles`](./header#headerStyles) property and the style of the frame components (index, add new column,
new row) can be set via the [`frameComponentsStyles`](./table#frameComponentsStyles) property.
If you wish to set the header cell style please use the [`headerStyles`](/docs/header#headerStyles) property and the style of the frame components (index, add new column,
new row) can be set via the [`frameComponentsStyles`](/docs/table#frameComponentsStyles) property.
:::

<LineBreak></LineBreak>

### `rootCell` {#rootCell}

- Type: {`text: string`, [`styles: StatefulCSS`](./sharedTypes#StatefulCSS)}
- Type: {`text: string`, [`styles: StatefulCSS`](/docs/sharedTypes#StatefulCSS)}
- Default: _{text: "+"}_

Configuration for the default cell when there is no content inside the table. <br />
`text` defines the content inside the cell. <br />
`styles` is used to define the cell's appearance for various mouse states. This is particularly useful for controlling the cell _width_ if you
have set a _width_ property inside [`tableStyle`](./table#tableStyle) as the root cell will by default be stretched to match it (all documentation examples actually use
have set a _width_ property inside [`tableStyle`](/docs/table#tableStyle) as the root cell will by default be stretched to match it (all documentation examples actually use
_width: 100%_ so you will notice that other examples' root cells match their original table widths). Outer styling such as _border_ and _boxShadow_ will
need to be controlled in [`tableStyle`](./table#tableStyle).
need to be controlled in [`tableStyle`](/docs/table#tableStyle).

#### Example

Expand Down Expand Up @@ -306,7 +306,7 @@ need to be controlled in [`tableStyle`](./table#tableStyle).
- Type: `boolean`
- Default: _true_

Controls if cell text can be edited for both data and header cells. This property is superseded by [`isHeaderTextEditable`](./header#isHeaderTextEditable) for header cells.
Controls if cell text can be edited for both data and header cells. This property is superseded by [`isHeaderTextEditable`](/docs/header#isHeaderTextEditable) for header cells.

#### Example

Expand Down
4 changes: 2 additions & 2 deletions website/docs/docs/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ tableElementRef.addEventListener('content-update', (contentUpdate) => { console.

- Function: (`columnsUpdate: Body`) => `void`
- Event: `columns-update`
- Body: [`ColumnsDetails`](./sharedTypes#ColumnsDetails)
- Body: [`ColumnsDetails`](/docs/sharedTypes#ColumnsDetails)

Triggered when any of the properties inside the [`ColumnsDetails`](./sharedTypes#ColumnsDetails) object are updated. This is particularly useful if the user has made changes to columns and you want to recreate them
Triggered when any of the properties inside the [`ColumnsDetails`](/docs/sharedTypes#ColumnsDetails) object are updated. This is particularly useful if the user has made changes to columns and you want to recreate them
in the next session on the initial load.

#### Example
Expand Down
8 changes: 4 additions & 4 deletions website/docs/docs/files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 10
# Files

Active Table supports the following file formats: `csv`, `xls`, `xlsx`, `ods`, `txt`. You can import or export files via the use of [buttons](#FileButton),
[methods](./methods#importCSV) or using [drag and drop](#DragAndDrop). You can additionally copy data from an external spreadsheet and paste it into the table directly.
[methods](/docs/methods#importCSV) or using [drag and drop](#DragAndDrop). You can additionally copy data from an external spreadsheet and paste it into the table directly.

:::info
`csv` is supported natively, however if you are using any of the other file formats - you will need to add the [`xlsx`](https://www.npmjs.com/package/xlsx) module
Expand Down Expand Up @@ -89,8 +89,8 @@ Object types for properties inside [`files`](#files):
&nbsp;&nbsp;&nbsp;&nbsp;[`import: true | ImportOptions`](#ImportOptions), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`export: true | ExportOptions`](#ExportOptions), <br />
&nbsp;&nbsp;&nbsp;&nbsp;`text?: string`, <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`styles?: StatefulCSS`](./sharedTypes#StatefulCSS), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`position?: OuterContentPosition`](./sharedTypes#OuterContentPosition), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`styles?: StatefulCSS`](/docs/sharedTypes#StatefulCSS), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`position?: OuterContentPosition`](/docs/sharedTypes#OuterContentPosition), <br />
&nbsp;&nbsp;&nbsp;&nbsp;`order?: number` <br />
}
- Default: {<br />
Expand Down Expand Up @@ -247,7 +247,7 @@ This object requires either the `import` or `export` properties to be defined. <

### `DragAndDrop` {#DragAndDrop}

- Type: {[`overlayStyle?: CSSStyle`](./sharedTypes#CSSStyle)} & [`ImportOptions`](#ImportOptions)
- Type: {[`overlayStyle?: CSSStyle`](/docs/sharedTypes#CSSStyle)} & [`ImportOptions`](#ImportOptions)

Configuration for the drag and drop functionality. <br />
`overlayStyle` is used to customise the overlay element that is displayed when a file is dragged over the table. <br />
Expand Down
8 changes: 4 additions & 4 deletions website/docs/docs/filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Object types for filter:
&nbsp;&nbsp;&nbsp;&nbsp;`defaultColumnHeaderName?: string`, <br />
&nbsp;&nbsp;&nbsp;&nbsp;`placeholderTemplate?: string`, <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`styles?: FilterStyles`](#FilterStyles), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`position?: OuterContentPosition`](./sharedTypes#OuterContentPosition), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`position?: OuterContentPosition`](/docs/sharedTypes#OuterContentPosition), <br />
&nbsp;&nbsp;&nbsp;&nbsp;`order?: number` <br />
}
- Default: {<br />
Expand Down Expand Up @@ -214,10 +214,10 @@ the placeholder text will be _"Filter Brand"_. <br />
### `FilterStyles` {#FilterStyles}

- Type: {<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`input?: CSSStyle`](./sharedTypes#CSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp;[`input?: CSSStyle`](/docs/sharedTypes#CSSStyle), <br />
&nbsp;&nbsp;&nbsp;&nbsp;`placeholderColor?: string`, <br />
&nbsp;&nbsp;&nbsp;&nbsp;`caseIcon?:` [`StatefulCSS`](./sharedTypes#StatefulCSS) & {[`active?: CSSStyle`](./sharedTypes#CSSStyle)}, <br />
&nbsp;&nbsp;&nbsp;&nbsp;`dropdownIcon?:` [`StatefulCSS`](./sharedTypes#StatefulCSS) & {[`active?: CSSStyle`](./sharedTypes#CSSStyle)} <br />
&nbsp;&nbsp;&nbsp;&nbsp;`caseIcon?:` [`StatefulCSS`](/docs/sharedTypes#StatefulCSS) & {[`active?: CSSStyle`](/docs/sharedTypes#CSSStyle)}, <br />
&nbsp;&nbsp;&nbsp;&nbsp;`dropdownIcon?:` [`StatefulCSS`](/docs/sharedTypes#StatefulCSS) & {[`active?: CSSStyle`](/docs/sharedTypes#CSSStyle)} <br />
}

Styling properties for a filter component. <br />
Expand Down
Loading

0 comments on commit 4c7a498

Please sign in to comment.