Conversation
…the link in a new tab
- open a new tab on click link
…spect to cell_selectable, additional test and test flavor
|
|
||
| private memoizedCreateEdges = memoizeOne(( | ||
| active_cell: ICellCoordinates, | ||
| active_cell: ICellCoordinates | undefined, |
There was a problem hiding this comment.
Typing information was inaccurate.
| tooltip_conditional: ConditionalTooltip[]; | ||
|
|
||
| active_cell?: ICellCoordinates; | ||
| cell_selectable?: boolean; |
There was a problem hiding this comment.
New optional prop. If false, user can't select cells and active_cell and selected_cells will always be treated as null/empty.
src/dash-table/dash/Sanitizer.ts
Outdated
|
|
||
| const selected_cells = props.cell_selectable ? | ||
| props.selected_cells : | ||
| defaultProps.selected_cells |
There was a problem hiding this comment.
Make sure active_cell and selected_cells have default values if not selectable.
| const column = visibleColumns[col]; | ||
| if (column.presentation !== Presentation.Markdown) { | ||
| e.preventDefault(); | ||
| } |
There was a problem hiding this comment.
Allow click-through to the most nested target element for Markdown cells.
|
|
||
| if (!cell_selectable) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Opt out of selection processing if the table doesn't have selectable cells.
| import LazyLoader from 'dash-table/LazyLoader'; | ||
|
|
||
| export default class MarkdownHighlighter { | ||
| export default class Markdown { |
There was a problem hiding this comment.
Renamed as this helper doesn't only cover highlights now.
|
|
||
| assert len(test.driver.window_handles) == 1 | ||
| target.cell(0, "a").get().find_element_by_css_selector("a").click() | ||
| assert len(test.driver.window_handles) == 2 |
There was a problem hiding this comment.
Only thing I might add here is (1) verify that the new window actually went to google, and (2) switch back to the first window and verify that the cell is selected iff cell_selectable.
alexcjohnson
left a comment
There was a problem hiding this comment.
💃 Nice simple API addition and implementation, I like it! Just a small test addition, nonblocking if it turns out to be a pain.
- make sure the cell is selected iif cell_selectable before and after switching tabs
…n if set programmatically
|
Nice feature, which I was looking for, but it is not working. My app crashes with the following error: |
|
@FlorianRahe this feature has been merged but not yet released. It will be bundled with the next Dash release in a couple of weeks, or you can follow the steps in CONTRIBUTING.md to install in developer mode if you want to try it today. |
|
@Marc-Andre-Rivet How does one override the new default |
Closes #710
Changes the behavior of markdown cells so that clicking on the cell both selects the cell and
click throughto the underlying elementChanges the default markdown link target to
target=_blankto open a new tabNew
cell_selectableprop (default: True) that turns on/off the ability to select and navigate cells in the table (also overrides value ofactive_cellandselected_cellsduring the sanitation phase)Single click on markdown link opens it
"No selection" table mode