mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
Fixes data updating invoke the select
event (#3861)
* fix data updating invoke the `select` event * Update CHANGELOG.md * changes * change * change --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: Ali Abid <aabid94@gmail.com>
This commit is contained in:
parent
ad2ed23ce0
commit
7b0f48eb2c
@ -190,6 +190,7 @@ No changes to highlight.
|
||||
## Bug Fixes:
|
||||
|
||||
- Fixes Chatbot issue where new lines were being created every time a message was sent back and forth by [@aliabid94](https://github.com/aliabid94) in [PR 3717](https://github.com/gradio-app/gradio/pull/3717).
|
||||
- Fixes data updating in DataFrame invoking a `select` event once the dataframe has been selected. By [@yiyuezhuo](https://github.com/yiyuezhuo) in [PR 3861](https://github.com/gradio-app/gradio/pull/3861)
|
||||
- Fixes false postive warning which is due to too strict type checking by [@yiyuezhuo](https://github.com/yiyuezhuo) in [PR 3837](https://github.com/gradio-app/gradio/pull/3837).
|
||||
|
||||
## Documentation Changes:
|
||||
|
@ -44,12 +44,14 @@
|
||||
}>();
|
||||
|
||||
let editing: false | string = false;
|
||||
|
||||
const get_data_at = (row: number, col: number) => data[row][col].value;
|
||||
$: {
|
||||
if (selected !== false) {
|
||||
const loc = selected.split("-");
|
||||
const row = parseInt(loc[0]);
|
||||
const col = parseInt(loc[1]);
|
||||
dispatch("select", { index: [row, col], value: data[row][col].value });
|
||||
dispatch("select", { index: [row, col], value: get_data_at(row, col) });
|
||||
}
|
||||
}
|
||||
let els: Record<
|
||||
|
Loading…
Reference in New Issue
Block a user